Math Tutor c++ program, can't get the division part to function as it should

So I'm writing code for a math tutor program that has a selection menu and the user can addition, subtraction, multiplication, and division. I've gotten all but the division section to function the way i need them to. My teacher has said that I can never result in a negative or fractional answer, even for subtractions and
divisions, and that the best way to try and do this for the division part is to generate two random numbers in the 1-12 range, multiply them together,
and set the first number to that value. Here's the code I have for the division portion so far:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
  cout << "You have chosen Division, please answer the following questions: \n";
		do
		{
			//Generating the Random Numbers
			num1 = 1 + rand() % 12;
			num2 = 1 + rand() % 12;

			cout << "Question " << (divQuestion += 1) << endl;
			cout << divNum << " / " << num1 << " = ";
			cin >> UserAnswer;
			if (UserAnswer == divNum / num1)
			{
				cout << "Correct \n" << endl;
				userDivScore += 1;
				cout << "Your Score is: " << userDivScore << "/10 \n";
			}
			else
			{
				cout << "Incorrect \n" << endl;
				cout << "Your score is : " << userDivScore << "/10 \n";
			}
		} while (divQuestion < 10);


I wish I could do this in functions, which would probably solve my problem, but my teacher has said that it has to be in a switch form. I've tried setting the divNum variable to equal num1 * num2, and I've also tried setting it within my division code (divNum == num1 * num2) but every time I run the program divNum is always 0. I've searched the web and searched this site, and while I've found similar programs to what I'm making, I haven't seen a way to fix my problem. Any help is appreciated.
You need to seed with srand()
http://www.cplusplus.com/reference/cstdlib/rand/?kw=rand

rand() does indeed give you a random number, but it's going to be the same formula every single time, resulting in the same random number given over and over again. Using srand() along with time gives different numbers for rand() to plug and chug, thereby resulting in a different result.
i have the srand running in the main portion of the code already, this isn't the whole code.
Show the entire code, it might help.
can you show the entire code for us to help?
Topic archived. No new replies allowed.