Server IP : 172.16.15.8 / Your IP : 18.218.2.191 Web Server : Apache System : Linux zeus.vwu.edu 4.18.0-553.27.1.el8_10.x86_64 #1 SMP Wed Nov 6 14:29:02 UTC 2024 x86_64 User : apache ( 48) PHP Version : 7.2.24 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0705) : /home/artucci/../kebuck/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
// CS112 CS I Assignment 1 (ii) // Due: Wed. Sept. 22, 2010 // // File: hwlb.cpp // Author: Katie Buck // Instructor: Dr. Wang // // Compile: g++ hw1b.cpp // Run: ./a.out // // Goal: This program will have two addition, subtraction, // multiplication, and division problems. // #include <iostream> using namespace std; int main() { int num1, num2; int addition; cout << "Input the first two integers: "; cin >> num1 >> num2; addition = num1 + num2; cout << "The addition of the two is: "; cout << addition << "\n"; int num3, num4; cout << "Input two integers: "; cin >> num3 >> num4; addition = num3 + num4; cout << "The addition of the two is: "; cout << addition << "\n"; int num5, num6; int subtraction; cout << "Input two integers: "; cin >> num5 >> num6; subtraction = num5 - num6; cout << "The subtraction of the two is: "; cout << subtraction << "\n"; int num7, num8; cout << "Input two integers: "; cin >> num7 >> num8; subtraction = num7 - num8; cout << "The subtraction of the two is: "; cout << subtraction << "\n"; int num9, num10; int multiplication; cout << "Input two integers: "; cin >> num9 >> num10; multiplication = num9 * num10; cout << "The multiplication of the two is: "; cout << multiplication << "\n"; int num11, num12; cout << "Input two integers: "; cin >> num11 >> num12; multiplication = num11 * num12; cout << "The multiplication of the two is: "; cout << multiplication << "\n"; int num13, num14; int division; cout << "Input two integers: "; cin >> num13 >> num14; division = num13 / num14; cout << "The division of the two is: "; cout << division << "\n"; int num15, num16; cout << "Input two integers: "; cin >> num15 >> num16; division = num15 / num16; cout << "The division of the two is: "; cout << division << "\n"; return 0; }