Hi guys
Im trying to make a maths game for a friend of mines little brother jase, but I need it to generate 2 random numbers between 1 and the maximum number that jase said. I cant figure out how to get the rand1 = (rand()%10)+1; so that the 10 = whatever number he entered.
here is the code i have so far before i became stuck
#include<iostream>
#include <ctime>
#include <cstdlib>
using namespace std;
int main()
{
int choice
cout << "Welcome to jase's maths game, what operations would you like to practice\n";
cout << "1) Addition +\n";
cout << "2) Subtraction -\n";
cout << "Please enter your choice 1 or 2 then press enter: \n";
cin >> choice << endl;// Find out what jase wants to do
if (choice == 1)//If jase wants to do addition
{
int lowest=1
int highest
int rand1
int rand2
cout << "What is the biggest number you want to use: ";
cin >> highest << endl;
rand1 = (rand()%10)+1;// I need 10 to be the maximum number jase entered
Can somebody please show me how to do this i would be very grateful?
Many thanks
HLA91