Skip to main content

C++ Program to Display Number (Entered by the User)

Programming Languages

Welcome to coding world

 Write a C++ Program to Display Number (Entered by the User). Here’s simple Program to Print Number (Entered by the User) in C++ Programming Language.


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.

Here is source code of the C++ Program to Display Number (Entered by the User). The C++ program is successfully compiled and run(on Codeblocks) on a Windows system. The program output is also shown in below.

 SOURCE CODE :

/*  C++ Program to Display Number (Entered by the User)  */

 

#include <iostream>

using namespace std;

 

int main()

{

    int number;

 

    cout << "Enter an integer :: ";

    cin >> number;

 

    cout << "\nThe Number entered is :: " << number<<"\n";

    return 0;

}

Output:

/*  C++ Program to Display Number (Entered by the User)  */

 Enter an integer :: 8

the Number entered is :: 8

 Process returned 0

Above is the source code for C++ Program to Display Number (Entered by the User) which is successfully compiled and run on Windows System. The Output of the program is shown above.

 

If you found any error or any queries related to the above program or any questions or reviews, you want to to ask from us, you may Contact Us through our contact Page or you can also comment below in the comment section. We will try our best to reach up to you in short interval.

Popular posts from this blog

Key Ecommerce Leader (KEL) Pakistan Awards Event 2024 | Pakistan KEL Awards Winner Tayyub Hussnain (Norwich Street Wear) | 2024 Alibaba.com Pakistan Key E-commerce Leader Winner

 Key Ecommerce Leader (KEL) Pakistan Awards Event 2024 On August 20, 2024, Alibaba.com organized an exceptional event at the Pearl Continental Hotel in Lahore. Participants gained insights into global business strategies and discovered the vast opportunities available through Alibaba.com. In an exciting development, Alibaba.com announced the launch of Trade Assurance in Pakistan by the end of August 2024, representing a significant advancement for the Pakistani market. Featured speakers included: 🌟 Andrew Zheng - Vice President, Alibaba.com 🌟 Vianne Wang - Head of Global Supply Chain, Alibaba.com 🌟 Winni Chen - Merchant Development Manager The event was a resounding success, enhancing confidence in the future of eCommerce in Pakistan! πŸ’ͺπŸŽ‰ During the event, six successful business owners were invited to share their stories and insights. Mr.Tayyub Hussnain stood out with his inspiring success story and impressive leadership skills, captivating the audience and judges alike. Ho...

Ayeza Khan Bridal collection 2021

Pakistan Showbiz Ayeza khan celebrate 10M on Instagram Ayeza Khan & Danish Taimoor love story  

Good Morning Wishes