Posted by: thapap December 17, 2008
Login in to Rate this Post:
0
?
very interesting... i am not an expert but "cout" in "c" ... i am little doubtfull. ... may be something called "c plus plus" "c++" .. but definitely not c.......
but once again what do i knoe (O:
if i recall correctly....
set(w) does nothing more than aligning the width.. i.e. to the integer of length (w)
so ...
based on your initializing you are filling up the array called arr with elements
arr[0]=3
arr[1]=4
arr[2]=5
arr[3]=6
so the first display will show
3 4 5 6 [ with 4 spaces between each one of them]then
6 5 4 3 [ with 4 spaces between each of them ]
actually... (2) is very easy if you think about it...
for (i=0; i<=5; i++)
cout <<setw(4) << arr[2*i];
i will leave tech_guy to do that rest of the work.. ... this is tiring (O:
===============================
as always
what do i know (O:
but once again what do i knoe (O:
if i recall correctly....
set(w) does nothing more than aligning the width.. i.e. to the integer of length (w)
so ...
based on your initializing you are filling up the array called arr with elements
arr[0]=3
arr[1]=4
arr[2]=5
arr[3]=6
so the first display will show
3 4 5 6 [ with 4 spaces between each one of them]then
6 5 4 3 [ with 4 spaces between each of them ]
actually... (2) is very easy if you think about it...
for (i=0; i<=5; i++)
cout <<setw(4) << arr[2*i];
i will leave tech_guy to do that rest of the work.. ... this is tiring (O:
===============================
as always
what do i know (O: