predicting the output !

just wanted to know if what i think is the output is correct of this:
please help!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// 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;

} 



output??


3.2 5.2 7.2 9.2
3.2 4.2 5.2 6.2
3.2 3.2 3.2 3.2
3.2 2.2 1.2 .2
Last edited on
This is confusing enough, at least use the [code][/code]. Whenever you post code, always put it in those. It's the small butten to your right that looks like this: '<>'. Then, read the rules for posting and revise your post. Then someone will look at it.
Last edited on
*facepalm*

Try:

[code]//code here[/code]

It should become:

//code here

Could you repharse the question please?
ahh finally got it ... sorry lol.

the question is what is the output of the program


this is my answer:
3.2 5.2 7.2 9.2
3.2 4.2 5.2 6.2
3.2 3.2 3.2 3.2
3.2 2.2 1.2 .2

but im not sure if im right
I've been curious about this for some time now, how do you make the codetags, without actually making the codetags?
We can do this:
[co[i][/i]de][/code]
to output this:
[code][/code]
Topic archived. No new replies allowed.