Tuesday, July 14, 2009

How would I put this into C++?

printf("%s\n\n", line);


printf("Press enter");


scanf("%c", %26amp;play_again);





The only one I can figure out is the second one


cout %26lt;%26lt; "not sure", line %26lt;%26lt; endl; // need some help with this one


cout %26lt;%26lt; "Press enter" %26lt;%26lt; endl;


cin %26lt;%26lt; "not sure", %26lt;%26lt;%26amp;play_again %26lt;%26lt;endl; // that could be right

How would I put this into C++?
cout%26lt;%26lt;line%26lt;%26lt;endl%26lt;%26lt;endl;





cout%26lt;%26lt;"Press Enter";





cin%26gt;%26gt;play_again;
Reply:cout %26lt;%26lt;"not sure "%26lt;%26lt;line%26lt;%26lt;endl;


cout%26lt;%26lt;"press enter";


cin%26gt;%26gt;play_again;
Reply:cout%26lt;%26lt;"%s", %26lt;%26lt;line%26lt;%26lt;endl;


cout%26lt;%26lt;"press enter"%26lt;%26lt;endl;


cin%26lt;%26lt;"%c, %26lt;%26lt;%26amp;play_again%26lt;%26lt;endl;

plum

No comments:

Post a Comment