If you format the code correctly the problem should be obvious:
Code:
#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";
		}
	}
}
If you don't want a new number on every iteration, why is
Code:
r = rand () %101;
inside the while loop?