C++ User Input and output
In C++, input and output are typically handled by using the standard input and output streams, which can be represented by the objects cin and cout. cin is used for the input and cout is used for the output.
We use
coutto output text to the console.We use
cinto read input from the user. Note that>>is used to extract values from the input stream.
You'll see that it asks the user for an integer, reads the input, and then displays it back to the user.
Let us explain the input and the output with a simple example.


Thanks for reading,
Mohammed Muqafamuddin.
Comments
Join the discussionNo comments yet. Be the first to comment.