#include <iostream>
#include <time.h>
using namespace std;
void main() {
srand(time(0));
while (true) {
int brian;
int happy;
int r;
r = rand () %101;
cout <<rand () %101 << "\n";
cout << "enter number \n" ;
cin >> brian;
if (brian == r) {
cout << "Go you, you win\n";
}
else if (r<brian){
cout << "Lower\n";
}
else {
cout << "Higher\n";
}
}
}

Could anyone point out what's wrong with my code .
It's meant to be a higher or lower game but it keeps generating a new number everytime?