1)using 1 output statement with one stream insertion operator..
2)using 1 output statement with 4 stream insertion operators..
3)using 4 output statements....
Using C++ Write a program that prints 1 2 3 4 on the same line using 3 different methods...?
cout %26lt;%26lt; "1 2 3 4";
cout %26lt;%26lt; "1 " %26lt;%26lt; "2 " %26lt;%26lt; "3 " %26lt;%26lt; "4";
cout %26lt;%26lt; "1 ";
cout %26lt;%26lt; "2 ";
cout %26lt;%26lt; "3 ";
cout %26lt;%26lt; "4";
Reply:printf("Do your own homework!\n");
Reply:am working on it pls promise i'll get the vote of best answer
Reply:Huh - the answer above me was 28 minutes ago and nothing yet...
1) cout %26lt;%26lt; "1 2 3 4/n"
2) cout %26lt;%26lt; "1 " %26lt;%26lt; "2 " %26lt;%26lt; "3 " %26lt;%26lt; "4/n";
3) cout %26lt;%26lt; "1 ";
cout %26lt;%26lt; "2 ";
cout %26lt;%26lt; "3 ";
cout %26lt;%26lt; "4/n";
Wow - this is so basic that if you don't know this by this time in the semester, you're going to be really lost a month from now!
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment