fastread homefastrread library fastread menu

C++ : Print Number Entered by User

Tutorial by:Manisha Dubey      Date: 2016-06-18 03:27:29

❰ Previous Next ❱

#include <iostream>
using namespace std;

int main() {
    int number;
    cout << "Enter an integer: ";
    cin >> number;
    cout << "You entered " << number;
    return 0;


Enter an integer: 23
You entered 23

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

❰ Previous Next ❱


Submit Your Thought, Tutorial, Articls etc.

Submit Your Information India's Number one online promotion website