I'm fairly new to using C++, but I'd like to make a game like Krypto. To start off, I just need to learn how to make int a - f be a random number between 1 and 100.
#include <iostream>
#include <string>
using namespace std;
int main ()
{
int a;
int b;
int c;
int d;
int e;
int f;
string mystr;
a = 5;
b = 10;
c = 15;
d = 20;
e = 25;
f = 30;
cout << "Are you ready to play Krypto \n \n";
getline (cin, mystr);
cout << "\nThen let's play! \n" << a << ", " << b << ", " << c << ", " << d << ", " << e << ", Should Equal..\n" << f << "\n";
cout << "\nUse order of operations to solve, then Input the answer you find. \n \n";
getline (cin, mystr);
return 0;
}
so, simply, I want a, b, c, d, e, and f be a random number each time.
How would I accomplish this?