Hello,
How do I make a program does this:
dividing 115/45 and it only prints the whole integer which is 2
and takes the remaining 25 and put it in a cout statement?
int main()
{
// assigning a decimal to an integer automatically truncates the decimal value
int num = 115/45;
int remainder = 115%45;
cout << "The whole integer after division is: " << num << endl;
cout << "The remainder after division is: " << remainder << endl;
cin.ignore();
return 0;
}