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



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

Answer / 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

More C++ Interview Questions

Explain encapsulation in C++.

0 Answers   Verifone,


Define namespace.

1 Answers  


Mention the default functions in C++, how would you detect that error has occurred inside the constructor and destructor.

0 Answers   Adobe,


What is the 4 difference between delete[] and delete?

0 Answers   Alter,


What is a class in C++?

1 Answers   Amazon, TCS, UGC Corporation,


Write a program to input an integer from the keyboard and display on the screen “WELL DONE” that many times.

1 Answers  


Tell us the size of a float variable.

0 Answers   Accenture,


dynamic scoping is

0 Answers   Siemens,


What Is Polymorphism in C++ ?

2 Answers   IBS, Impetus, ITC Indian Tobacco Company, Motorola,


Factory Method C++ – How to delete pointers returned by it

0 Answers  


Question on Copy constructor.

0 Answers   Alter,


It is possible to build a C++ compiler on top of a C compiler. How would you do this?

0 Answers   Amazon,


Categories