Problem with coding "Random Number Guessing Game"
I am beginner in C++ and have written a little bit code to the "Random Number Guessing Game" but I don't know how to code the last bit of code the code looks like this
After "if (number ==)" I don't know how to continue tried a few things but no one of them worked.Code:#include <ctime> #include <cstdlib> #include <iostream> using namespace std; int randRange(int high, int low) { return rand() % (high - low) + 50; } void getRand() { srand(time(NULL)); for (int i = 0; i < 1; ++i) { cout << randRange(50, 0) << '\n'; } } int main() { int number; getRand(); cout << "Guess the number: "; cin >> number; if (number ==) }



1Likes
LinkBack URL
About LinkBacks



