A text file named foo.in contains three real numbers, one on each line, e.g., fo
ID: 3652649 • Letter: A
Question
A text file named foo.in contains three real numbers, one on eachline, e.g.,
foo.in
11.1
22.2
33.3
Write a complete C++ program which shall: (1) open foo.in for reading; (2) read the three numbers from the file into defined
double variables named a, b, and c; (3) open a text file named foo.out for writing; (4) write the numbers to foo.out, one per
line, in the reverse order; and (5) close both files. If foo.in contains the values shown above, then the contents of foo.out
would be,
foo.out
33.3
22.2
11.1