Sunday, 4 January 2015

Basic Input/Output


For Example one Input output::

// h/s example

#include <iostream>
using namespace std;

int main ()
{
  int h;
  cout << "Please enter an integer value: ";
  cin >> h;
  cout << "The value you entered is " << h;
  cout << " and its double is " << h*2 << ".\n";
  return 0;
}




Output:
Please enter an integer value: 702
The value you entered is 702 and its double is 1404.


No comments:

Post a Comment