cin >>
Reads from the input stream.
Syntax
cin >> variable;
Description
You read from the user with the >> operator. It writes directly to the variable (no & required).
Example
Loading editor…
This language is for reference/learning only — copy the code and try it in your own environment.
Expected output
(depending on the entered number) You entered: 5
When to use?
Console input.