Unit #6 Homework Problem | |
|
|
6hw2c |
|
Predict the output of the following program and also fill the table indicating the memory contents for j, k, and x at the end of the program main ( ) { float x [4][4]; int j, k ; cout << setiosflags( ios:: scientific) << setprecision ( 3); for ( j = 0; j <= 3; j = j + 1) { for ( k = 0; k <= 3 ; k++) x [j][k] = k + 3.2 - k * ( j - 1.) ; } for ( k = 1; k <= 3 ; k++) cout << setw(20) << x[3][k] << endl; cout << " enter e to exit"; char hold; cin >> hold; }
|
|