subject

How do i set up a remainder for my program? (C++) Details: i’m trying to set up a program meant for a child and i want a division problem to show remainders. I’ve tried but have no idea how.

Program:
#include
#include
#include
Int main() {

const int MIN_NUM = 1,
MAX_NUM = 99;

int randNum1,
randNum2;

Unsigned seed = time(0);
srand(seed);

randNum1 = (rand()%(MAX_NUM - MIN_NUM + 1) + MIN_NUM);

randNum2 = (rand()%(MAX_NUM - MIN_NUM + 1) + MIN_NUM);

case 'D':
case 'd': {
cout << "\nCool! \nLemme set you up with some DIVISION problems! " << endl;

cout << "\n";
cout << "\n";
cout << "\n " << randNum2 << "\n÷ " << randNum4 << "\n \n";

randNumAnswer = randNum2 / randNum4;

cin >> userAnswer;

if (userAnswer != randNumAnswer) {cout << "\nYou didn't get the right answer but try again. Don't lose hope!\n"; }

else if (userAnswer == randNumAnswer) { cout << "\nAmazing!! You did great!\n";}
break;}
}

return 0;
}

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:50
Can online classes such as gradpoint track your ip location like if im taking a final and i give somebody else my account and they take the final for me will it show where they are taking the final from? and can this be countered with a vpn
Answers: 1
question
Computers and Technology, 23.06.2019 01:00
Let r be a robotic arm with a fixed base and seven links. the last joint of r is a prismatic joint, the other ones are revolute joints. give a set of parameters that determines a placement of r. what is the dimension of the configuration space resulting from your choice of parameters?
Answers: 3
question
Computers and Technology, 23.06.2019 02:00
In the context of an internet connection, llc stands for leased line connection liability limited company local loop complex local loop carrier
Answers: 1
question
Computers and Technology, 23.06.2019 09:30
Name the range function that would generate the following list of integers values: 0,1,2,3,4,5.
Answers: 1
You know the right answer?
How do i set up a remainder for my program? (C++) Details: i’m trying to set up a program meant for...
Questions
Questions on the website: 13722363