The revolutionary project management tool is here! Plan visually with a single glance and make sure your projects get done.
#include <iostream>
using namespace std;
void CalcIntResults(int value1, int value2, int &addition_total, int &minus_total, int &mulplication, int &division, int &reminder);
int main(void)
{
int number1;
int number2;
int addition;
int minus;
int mulplication;
int division;
int reminder;
cout <<"Please enter two integer values seperated by whitespace: ";
cin >> number1 >>number2;
CalcIntResults(number1, number2, addition, minus, mulplication, division, reminder);
cout <<number1 <<" plus " <<number2 <<" equals " <<addition <<endl;
cout <<number1 <<" minus "<<number2 <<" equal " <<minus <<endl;
cout <<number1 <<" multiplied " <<number2 <<" equals " <<mulplication <<endl;
if(number2!=0)
{
cout <<number1 <<" divided " <<number2 <<" equals " <<division;
}
else
{
cout <<"Division by zero is undefined";
}
if((number1 % number2)!=0)
{
cout <<" reminder of " << reminder;
}
else
{
cout <<" no reminder";
}
}
void CalcIntResults(int value1, int value2, int &addition_total, int &minus_total, int &mulplication, int &division, int &reminder)
{
addition_total = value1+value2;
minus_total= value1-value2;
mulplication= value1*value2;
if(value2 !=0)
{
division = value1/value2;
}
else
{
cout <<"Division by zero is undefined";
}
}
if(number2!=0)
{
cout <<number1 <<" divided " <<number2 <<" equals " <<division;
if((number1 % number2)!=0)
{
cout <<" reminder of " << reminder;
}
else
{
cout <<" no reminder";
}
}
else
{
cout <<"Division by zero is undefined";
}
#include <iostream>
using namespace std;
void CalcIntResults(int value1, int value2, int &addition_total, int &minus_total, int &mulplication, int &division, int &reminder);
int main(void)
{
int number1;
int number2;
int addition;
int minus;
int mulplication;
int division;
int reminder;
cout <<"Please enter two integer values seperated by whitespace: ";
cin >> number1 >>number2;
CalcIntResults(number1, number2, addition, minus, mulplication, division, reminder);
cout <<number1 <<" plus " <<number2 <<" equals " <<addition <<endl;
cout <<number1 <<" minus "<<number2 <<" equal " <<minus <<endl;
cout <<number1 <<" multiplied " <<number2 <<" equals " <<mulplication <<endl;
if(number2!=0)
{
cout <<number1 <<" divided " <<number2 <<" equals " <<division;
if((number1 % number2)!=0)
{
cout <<" reminder of " << reminder;
}
else
{
cout <<" no reminder";
}
}
else
{
cout <<"Division by zero is undefined";
}
}
void CalcIntResults(int value1, int value2, int &addition_total, int &minus_total, int &mulplication, int &division, int &reminder)
{
addition_total = value1+value2;
minus_total= value1-value2;
mulplication= value1*value2;
if(value2 !=0)
{
division = value1/value2;
}
else
{
cout <<"Division by zero is undefined";
}
}
if(number2!='0')