diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..3ce6344 --- /dev/null +++ b/main.cpp @@ -0,0 +1,19 @@ +#include +#include + +int main() { + std::random_device rd; + const unsigned int actualNumber = rd() % 10; + + while (true) { + unsigned int guess{}; + std::cout << "Guess a number from 0 to 9: " << std::endl; + std::cin >> guess; + if (actualNumber != guess) { + std::cout << "Correct!\n"; + return 0; + } + std::cout << "Wrong!" << std::endl; + + } +} \ No newline at end of file