How to Print Number Entered by User | C++ Examples

  • last year
In this example, you'll learn to print the number entered by a user using a C++ cout statement.

This program asks the user to enter a number.
When the user enters an integer, it is stored in the variable number using cin.
Then it is displayed on the screen using cout.

Recommended