#include
#include
using namespace std;
int main()
{
srand((unsigned int)time(NULL));
int num = rand() % 100 + 1;
int a = 0;
cout << "请输入您所认为的数字" << endl;
cin >> a;
int c = 0;
while (c <= 5)
{
c = c + 1;
if(c<=5){
if (a > num)
{
cout << "错误,数字过大" << endl;
}
else if (a < num)
{
cout << "错误,数字偏小" << endl;
}
else
{
cout << "正确" << endl;
break;
}
}
}
system("pause");
return 0;
}