Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
328 B
1
Indexable
Never
// random
#include <iostream>
using namespace std;
int main()
{
	srand(time(NULL));
	int a;
	a = rand()% 100 + 1;
	bool s = 0;
	int w;
	while (s == 0)
	{
		cin >> w;
		if (w < a)
		{
			cout << "+\n";
		}
		if (w > a)
		{
			cout << "-\n";
		}
		if (w == a)
		{
			cout << "!!!";
			return 0;
		}
	}
}