Question
For this assignment you will write two programs: Program 1-Write a program that asks the userto enter five numbers. Use a floatin-point data type to hold thenumbers. The program should create a file and save all five numbersto the file. Program 2-Write a program that opens the filecreated by Program 1, reads the five numbers, and displays them.the program should also calculate and display the sum of the fivenumbers. CAN SOMEONE PLEASE HELP ME WITH CREATING THESE PROGRAMS, IREALLY NEED SOME HELP.PLEASEEEEEEEEEEEEEEE!!!!!!!!!!!!!!!!!!!!!!!!!!!!! For this assignment you will write two programs: Program 1-Write a program that asks the userto enter five numbers. Use a floatin-point data type to hold thenumbers. The program should create a file and save all five numbersto the file. Program 2-Write a program that opens the filecreated by Program 1, reads the five numbers, and displays them.the program should also calculate and display the sum of the fivenumbers. CAN SOMEONE PLEASE HELP ME WITH CREATING THESE PROGRAMS, IREALLY NEED SOME HELP.PLEASEEEEEEEEEEEEEEE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Explanation / Answer
please rate - thanks program 2 #include #include using namespace std; int main() {float number,sum=0; int i; ifstream in; in.open("test.out"); //open file if(in.fail()) //is it ok? { cout