Oh, my.
outfile << setiosflags(ios::showpoint|ios::fixed)<< setprecision(2);
outfile << setw(49)<<"Mini Computer" << endl;
outfile << setw(49)<<"=============" << endl << endl;
outfile << setw(35)<<"Operand 1" <<setw(35)<<"Operand 2" <<endl;
outfile << setw(35)<<"=========" <<setw(35)<<"=========" <<endl << endl;
outfile << setw(35)<<op1 << setw(35)<<op2 << endl << endl;
outfile << setw(8)<<"Sum" <<setw(15)<<"Difference" <<setw(12)<<"Product" <<setw(19)<<"Whole Quotient" <<setw(14)<<"Remainder" <<endl;
outfile << setw(8)<<"===" <<setw(15)<<"==========" <<setw(12)<<"=======" <<setw(19)<<"==============" <<setw(14)<<"=========" <<endl << endl;
outfile << setw(8)<<sum << setw(15)<<difference << setw(12)<<product << setw(19) <<w_quotient << setw(14) <<modulus << endl << endl;
outfile << setw(15)<<"Real Quotient" <<setw(26)<<"Square Root of Operand 1" <<setw(29)<<"Operand 2 to the power of 4" <<endl;
outfile << setw(15)<<"=============" <<setw(26)<<"========================"<< setw(29)<<"===========================" <<endl << endl;
outfile << setw(15)<<r_quotient << setw(26)<<sqrt << setw(29)<<power << endl;
Reputation Points: 2780
Solved Threads: 312
long time no c
Offline 4,790 posts
since Apr 2004