#include<iostream>
#include<stdio.h>
#include<string>
using namespace std;
int main()
{
int trueprice = 98;
cout << "物品的价格" << trueprice << endl;
int price;//猜的价格
while (1)
{
cin >> price;
if (price > trueprice)
cout << "价格飞高了" << endl;
else if (price < trueprice)
cout << "价格低了" << endl;
else
{
cout << "回答正确" << endl;
break;
}
}
system("pause");
return 0;
}
猜商品价格
最新推荐文章于 2021-09-23 13:29:07 发布