Server IP : 172.16.15.8 / Your IP : 3.147.205.19 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/ctames/../owpile/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
// CS 112 CS 1 Assignment 1(2) // Due: Wed. Sept. 22, 2010 // // File name: hw1b.cpp // Author: Orlando Pile // Instructor: Dr. Wang // // Compile: g++ hw1.cpp // Run: ./a.out // // Goal: The program will prompt and let the user input // integers and get results // #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; int subtraction; cout << "Input the second two integers: "; cin >> num3 >> num4; subtraction = num3 - num4; cout << "The subtraction of the two is: "; cout << subtraction << "\n"; int num5, num6; int multiplication; cout << "Input the third pair of integers: "; cin >> num5 >> num6; multiplication = num5 * num6; cout << "the multiplication of the two is: "; cout << multiplication << "\n"; int num7, num8; int division; cout << "Input the fourth pair of integers: "; cin >> num7 >> num8; division = num7 / num8; cout << "The division of the two is: "; cout << division << endl; return 0; }