### Layout Design Matrix Calculator

Hi guys, I want to ask on how to put a layout design in the program when it is being ran. It should look like these: http://i1102.photobucket.com/albums/g460/Dinadan_Caerleon/Calculator.jpeg

This is a sample code:
 ``123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101`` `````` #include using namespace std; main() { int m, n, c, d, first[10][10], second[10][10], sum[10][10], minus[10][10], times[10][10]; char ans; cout << "\n\t\t\tWelcome! :)\n"; cout << "\n\tThis is a Matrix Operation Program\n"; cout << endl; cout << "\n\nEnter the number of rows and columns of matrix: \n"; cout << "[Number of Rows]: "; cin >> m; cout << "[Number of Columns]: "; cin >> n; cout << endl; cout << "Enter the elements of first matrix: \n"; cout << endl; for ( c = 0 ; c < m ; c++ ) for ( d = 0 ; d < n ; d++ ) cin >> first[c][d]; cout << endl; cout << "Enter the elements of second matrix: \n"; cout << endl; for ( c = 0 ; c < m ;c++ ) for ( d = 0 ; d < n ; d++ ) cin >> second[c][d]; cout << endl; for ( c = 0 ; c < m ; c++ ) for ( d = 0 ; d < n ; d++ ) sum[c][d] = first[c][d] + second[c][d]; cout << "Sum of entered matrices: \n"; cout << endl; for ( c = 0 ; c < m ; c++ ) { for ( d = 0 ; d < n ; d++ ) cout << sum[c][d] << "\t"; cout << endl; } for ( c = 0 ; c < m ; c++ ) for ( d = 0 ; d < n ; d++ ) minus[c][d] = first[c][d] - second[c][d]; cout << "Difference of Entered Matrices: \n"; cout << endl; for ( c = 0 ; c < m ; c++ ) { for ( d = 0 ; d < n ; d++ ) cout << minus[c][d] << "\t"; cout << endl; } for ( c = 0 ; c < m ; c++ ) for ( d = 0 ; d < n ; d++ ) times[c][d] = first[c][d] * second[c][d]; cout << "Products of Entered Matrices: \n"; cout << endl; for ( c = 0 ; c < m ; c++ ) { for ( d = 0 ; d < n ; d++ ) cout << times[c][d] << "\t"; cout << endl; } cout << "\nDo you want to solve another matrix?\n"; cout << "[Y] or [N]: "; cin >> ans; cout << endl; if (ans== 'Y') return main (); else (ans == 'N'); return 0; }``````
up
for such a design you need GUI (wxwidgets, qt, etc) but not the console.
Topic archived. No new replies allowed.