C++ Input and Output
By now you already how we instruct the computer to give output, using cout standard output stream we can get the output on the display screen.
Now for getting input we make use of cin which is a C++ standard input stream, this instructs the computer to take input from the standard input device which is a keyboard in most cases.
Let us consider this example code to input 2 numbers from the user and give the sum as output:
This is how we can input variables from users and display the output.