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

Is oops and c++ same?

573


Given the following seqment of code containing a group of nested if instructions: y = 9; if ((x==3) || (x == 5)) y++; else if (x == 2) y *= 2; else if (x == ) y-= 7; else y = 8; if the value of x is 4 before the nested IFs are executed, what is the value of y after the nested IFs are executed?

1576


Who made c++?

604


What is stream in oop?

835


Describe delete operator?

616






What c++ is used for?

577


What is for loop and its syntax?

592


What happens if a pointer is deleted twice?

781


What is #include iostream in c++?

584


What's the "software peter principleā€?

616


Explain the difference between using macro and inline functions?

573


What is the auto keyword good for in c++?

615


What is ostream in c++?

567


Differentiate between the message and method in c++?

602


What is a modifier in c++?

625