Input output integer

Unlike C language C++ does not require to specify the type of data for IO (Input/Output) operation. You can directly print any desirable data to the console using cout with the insertion operator (<<). Similarly, for taking input you can use cin with the extraction operator(>>).

Program

#include <iostream>

using namespace std;

int main() {

    int number;

    cout << "Enter any number : ";
    cin >> number;

    cout << endl << "Your entered number : " << number;
    
    return 0;
}

Output

Enter any number : 100
Your entered number : 100