Website Summary Files Commits Branches @commit @diff @stats
path: root / Week04 / Exercise18.cpp
blob: f323c5b1c1da9ae21c0376a13cf3e15555cfc02e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <iostream>

int main() {
    const unsigned int NUMBER = 1337;

    unsigned int guess;
    std::cin >> guess;

    while (guess != NUMBER) {
        if (guess < NUMBER) {
            std::cout << "Higher" << std::endl;
        }
        else {
            std::cout << "Lower" << std::endl;
        }
        std::cin >> guess;
    }
    std::cout << "You guessed it!";

    return 0;
}