Monday, May 24, 2010

Can someone give me the C++ code for input & output.?

#include %26lt;iostream%26gt;





main ()


{


int ival;





// read value if ival from input stream after prompting





cout %26lt;%26lt; "Enter value: ";





cin %26gt;%26gt; ival;


}

Can someone give me the C++ code for input %26amp; output.?
If you want the user to type something in, it would be





cin %26gt;%26gt; X;





if you want to then put X on the screen, it would be





cout %26lt;%26lt; X;

sundew

No comments:

Post a Comment