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

Answer Posted / hr

Solution:
/* 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 << "
The Number entered is :: " << number<<"
";
return 0;
}
Output:
/* C++ Program to Display Number (Entered by the User) */
Enter an integer :: 8
The Number entered is :: 8
Process returned 0

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When must you use a constructor initializer list?

779


What is the use of lambda in c++?

795


Why c++ is not a pure oop language?

769


Can a program run without main?

909


What it is and how it might be called (2 methods).

877


What is a c++ vector?

801


What are objects in oop?

853


Why is there no multiple inheritance?

786


What are multiple inheritances (virtual inheritance)? What are its advantages and disadvantages?

826


What are structures and unions?

805


What is the difference between public, private, and protected access?

833


How can you specify a class in C++?

1034


program explaining feautures of c++

2197


What is polymorphism and why is it important?

793


Can recursive program be written in C++?

936