Introduction
Control Statement
- Program to the sum of natural numbers
- Program to check leap year
- Program to find factorial of the number
- Program to find reverse of the number
- Program to Check Armstrong Number
- Program to find the sum of Natural Numbers using Recursion
- Calculator Program
- Program to identify day of week
- Program to print Fibonacci series
Function
- Program to convert Binary to Octal Number
- Program to convert Octal to Binary Number
- Program to find reverse of the sentence using Recursion
- Program to Shutdown and restart Computer
- Program to find the area of triangle
- Program to find LCM
- Program to check prime number using Functions
- Program to convert Binary to Decimal Number
- Program to convert Decimal to Binary Number
Array
Pointer
OOPS
No Examples found for this topic - CodeHelpPro
Program to Print Number Entered by User
In this example, We will learn how to print number entered by user. We will do this using cout and cin function.
In this example, Program will ask an number. After user entered number then it will print that number.
Print Number Entered by User
#include <iostream>
using namespace std;
int main()
{
int number;
cout << "Enter an integer: ";
cin >> number;
cout << "You entered : " << number;
return 0;
}
The output of above program is
Enter an integer: 20
You entered : 20
Subscribe
Login
0 Comments
Inline Feedbacks
View all comments