Input / Output in C++


/****************************************************
Program:	io.C
Programmer:	Brian Lawton
Modified:	08/16/2001
****************************************************/


#include <iostream.h> // Pre-processor Directive to include I/O Library

int main()
{
	int num1, num2, sum; // Define three integer variables	
	cout << "Please enter the integer values to be added: "; // Prompt the user 
        cin>> num1 >> num2; // Receive input values
	sum = num1 + num2;
	cout << "The sum of the two values is: " << sum << endl; // Display output 
	return 0;
} 




Back to Previous Page

Document:
Local Date:
Last Modified On: