Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.
Become a Premium Member and unlock a new, free course in leading technologies each month.
#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";
}
}
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
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 you are experiencing a similar issue, please ask a related question
Join the community of 500,000 technology professionals and ask your questions.