Get premium membership and access questions with answers, video lessons as well as revision papers.

Write a program for input and output operations

      

Write a program for input and output operations

  

Answers


Kavungya
// This program demonstrates use of data streams cin for input and cout for output
#include
int main ( )
{
int i;
cout << “Please enter an integer value:”
cin >> i;
cout << “The value you have entered is “<cout << “and its double is “<return 0;
}
The output of the above program is as follows:-
- Please enter an integer value
- 444 (for example)
- The value you entered is 444 and its double is 888
Kavungya answered the question on May 15, 2019 at 14:44


Next: Write a C++ program that can compute and the sum and average of 15 numbers.
Previous: Describe programming in C++

View More Computer Programming Questions and Answers | Return to Questions Index


Learn High School English on YouTube

Related Questions