#include<iostream>
using namespace std;
int main()
{
int rnd = 1 + (rand() % 99999);
char comp;
cout << "Introduzca el valor a comparar" << endl;
cin >> comp;
if (comp > rnd)
{
cout << ">";
}
else if (comp < rnd)
{
cout << "<";
}
else if (comp = rnd)
{
cout << "=";
}
}
So, in this C++ program I'm trying to get the user to guess a number, but I want them to have a limited number of tries at guessing (20). I have basically zero experience in C++ and I don't know how to implement this system.