Skip to content

Instantly share code, notes, and snippets.

@batmantec
Created February 2, 2016 17:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save batmantec/725115330c7a65467d16 to your computer and use it in GitHub Desktop.
Save batmantec/725115330c7a65467d16 to your computer and use it in GitHub Desktop.
#include <iostream>
using namespace std;
int main (){
int num1, num2, mult, divi, mod;
cout << "Please enter the first number (calculate the product, integer division, and remainder of the division): ";
cin >> num1;
cout << "Please enter the second number (calculate the product, integer division, and remainder of the division): ";
cin >> num2;
mult=(num1*num2);
divi=(num1/num2);
mod=(num1%num2);
cout << "The product is: "<<mult<<endl;
cout << "The integer division is: "<<divi<<endl;
cout << "The remainder of the division is: "<<mod<<endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment