Computers and Technology

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;
}

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 17:30, cesargarcia17671
Type the correct answer in the box. spell all words correctly. under which key category do the page up and page down keys fall? page up and page down keys fall under the keys category.
Answers: 3
image
Computers and Technology, 23.06.2019 06:00, 573589
What machine listens for http requests to come in to a website’s domain? a. a router b. a browser c. a server d. a uniform resource locator
Answers: 1
image
Computers and Technology, 23.06.2019 09:30, Cocco
You have been supporting csm tech publishing's windows server 2016 server network for over a year. the office has two windows server 2016 servers running active directory and a number of other roles. management has informed you that a small sales office is opening in the same building three floors up. the sales manager wants to install a sales application on a server located in the sales office. this server will have limited physical security because there's no special room dedicated for it, which means it will be accessible to non-it personnel and visitors. you're considering installing windows server 2016 server core on the new server because accessing its console regularly probably won't be necessary, and this server will be managed from one of the other csm tech publishing servers. what are the benefits and drawbacks of using server core for this branch office? what are some things you should do to set up this server management environment?
Answers: 1
image
Computers and Technology, 23.06.2019 13:00, jaelynnm
Donnie does not have powerpoint. which method would be best for elana to save and share her presentation as is? a pdf a doc an rtf a ppt
Answers: 3
Do you know the correct answer?
How do i set up a remainder for my program? (C++) Details: i’m trying to set up a program meant for...

Questions in other subjects: