//guess the number game (very simple) #include using namespace std; int main() { // tutorial std::cout << "Guess a number from 1- 10" << std::endl; // random number each time srand(time(0)); // vars int e = rand() % 11; int r; // input cin >> r; // function if (r == e) { cout << "You win!"; } else { cout << "You lose, the correct number was" << std::endl; cout << e << std::endl; } system("pause"); }