Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <iostream>
- #include <cstdlib>
- using namespace std;
- int main()
- {
- int guess;
- int number;
- number = rand() % 1000 + 1;
- while ( <=8)
- cout << "Guess a number: ";
- cin >> guess;
- if (guess > number)
- {
- cout << "Your Guess is too high!" << endl;
- }
- else if (guess < number)
- {
- cout << "Your Guess is too low!" << endl;
- }
- else
- cout << "You Are Right!" << endl;
- system("PAUSE");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement