Original Post
this ones got me funny im learning c++ from a book and the example uses rand() to pick a number to for you t guess but the number is the same every time the program is run here is the source is the book just wrong or am i typing somthing wrong and not seeing it // Magic Number Program. #include #include using namespace std; int main() { int magic; // magic number int guess; // users guess magic = rand(); // get magic number for user to guess cout << "Enter your guess: "; cin >> guess; if(guess == magic) cout << "\n ***right***"; else cout << "You guessed the wrong number sorry \n" << magic <<"\n"; system("pause"); }