Problem:
Question- Create a program that reads 5 floating-point numbers from user input and writes those numbers into a file named sample.txt. Then this program opens sample.txt file and reads those 5 numbers, calculates the average and sum, and displays them in the console. Format the numbers to display only 2 decimal numbers.
Please describe the code with the help of comments.