Unic 2 Explain One Two Sentences Following Program Eg Calculates Average Set Numbers Print Q43889276
c++
UNIC 2. Explain in one or two sentences, what the following program does (e.g. “It calculates the average of a set of numbers”, “It prints a pyramid of a specific character where the character and the height of the pyramid are user defined”). (10 points) include <iostream> #include<fstream> using namespace std; int main () fstream f1,f2; char c; f1.open (“filel.txt”, ios::in); f2. open (“file2.txt”, ios::out) ; if (f1.fail ()) cout<<“Error!”<<endl; else c=f1.get (); while (c!=EOF) f2<<c; c=f1.get () ; fl.close (): f2.close (); return 0; …… ……… ..******. ……. 1…….. ………….. ….** Show transcribed image text UNIC 2. Explain in one or two sentences, what the following program does (e.g. “It calculates the average of a set of numbers”, “It prints a pyramid of a specific character where the character and the height of the pyramid are user defined”). (10 points) include #include using namespace std; int main () fstream f1,f2; char c; f1.open (“filel.txt”, ios::in); f2. open (“file2.txt”, ios::out) ; if (f1.fail ()) cout
Expert Answer
Answer to UNIC 2. Explain in one or two sentences, what the following program does (e.g. “It calculates the average of a set of nu…
OR