/** * Assignment #1, Program 2 * Program to perform arithmetic on two variables * Author: Mark Allen Weiss * SSN: 000-00-0000 * Course: COP-2210 Section 8 * Date: September 16, 1998 * * CERTIFICATION OF SOLE AUTHORSHIP * I certify that this work is solely my own and * that none if it is the work of any other person. * I further certify that I have not provided any * assistance to other students enrolled in COP-2210 that * would render their CERTIFICATION OF SOLE AUTHORSHIP * invalid. I understand that violations of this pledge * may result in severe sanctions. * * * * ----------------------------------- * (Mark Allen Weiss) <--- Put your name here, and sign above */ #include int main( ) { // Input variables int x, y; // Output variables int sum, difference, product; double quotient; // Read inputs cout << "Please enter x and y: "; cin >> x; cin >> y; // Compute answers sum = x + y; difference = x - y; product = x * y; quotient = double( x ) / double( y ); // Output results cout << "The sum is " << sum << "." << endl; cout << "The difference is " << difference << "." << endl; cout << "The product is " << product << "." << endl; cout << "The quotient is " << quotient << "." << endl; return 0; }