Lab01_sample - using namespace std int main int A B int add...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
    Lab 01 Sample Code #include <iostream> using namespace std; int main() {       int A, B;       int add, sub, mult, div;       cout << "Enter two integer variables  A and B: ";       cin >> A >> B;       add = A + B;       sub = A - B;       mult = A * B;       div = A / B;       cout << "Addition: " << add << endl;       cout << "Subtraction: " << sub <<  endl;       cout << "Multiplication: " << mult <<  endl;       cout << "Division: " << div << endl;       return 0; #include <iostream>
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: using namespace std; int main() { int A, B; int add, sub, mult, div; cout << "Enter two integer variables A and B: "; cin >> A >> B; add = A + B; sub = A - B; mult = A * B; div = A / B; cout << "Addition: " << A + B << endl; cout << "Subtraction: " << A - B << endl; cout << "Multiplication: " << A * B << endl; cout << "Division: " << A / B << endl; return 0; }...
View Full Document

This note was uploaded on 07/14/2008 for the course CMPSC 101 taught by Professor Drobish,renee during the Summer '07 term at Penn State.

Ask a homework question - tutors are online