square.cpp 285 Bytes EditWeb IDE 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 #include<fstream> using namespace std; int main(int argc, char* argv[]) { string input_file_path(argv[1]); string output_file_path("b.dat"); ifstream f_in(input_file_path); int x; f_in >> x; ofstream f_out(output_file_path); f_out << x*x; return 0; }