#include <iostream.h>
#include <stdlib.h>
using namespace std;
int main(int argc, char *argv[])
{
int number = 8;
int guess;
do {
cout << "im thinking of a number between 1 and 10\n";
cout << "enter your guess please\n";
cin >> guess;
if (guess == number) {
cout << "you are correct\n";
}
else if (guess < 8) {
cout << "guess a higher number\n";
}
else if (guess > 10) {
cout << "your not supposed to guess this high\n";
}
else {
cout << "guess a lower number\n";
}
}while (guess != 8);
system("pause");
return 0;
}
Could someone kindly tell me how I can make it so that the guess is randomized?
Oh ya, I found a site that explains c++ in for actual BEGINNERS with no programming background. Could someone also explain to me what the stuff in the parentheses mean?int main(int argc, char *argv[])