Server IP : 172.16.15.8 / Your IP : 13.59.129.141 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/snbittner/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
// CS112 CS I Assignment 1 // Due: Wed. Spet 22, 2010 // // File Name: hw1b.cpp // Author: Stephanie Bittner // Instructor: Dr. Wang // // Compile: g++ hw1b.cpp // Run: ./a.out // // Goal: The program will do simple math problems #include <iostream> using namespace std; int main() { int num1, num2; int num3, num4; int num5, num6; int num7, num8; int addition; int subtraction; int multiplication; int division; cout << "Input the first two intergers: "; cin >> num1 >> num2; addition = num1 + num2; cout << "The addition of the two is: "; cout << addition << "\n"; cout << "Input the next two intergers: "; cin >> num3 >> num4; subtraction = num3 - num4; cout << "The subtraction of the two is: "; cout << subtraction << "\n"; cout << "Input two more integers: "; cin >> num5 >> num6; multiplication = num5 * num6; cout << "The multiplication of the two is: "; cout << multiplication << "\n"; cout << "Input the last two integers: "; cin >> num7 >> num8; division = num7 / num8; cout << "The division of the two is: "; cout << division << "\n"; return 0; }