o(∩_∩)o...求助...给余猜数的游戏
心里想好一个在1~100之间的整数,将他分别除以3,4,7并得到3个余数。你把这3个余数告诉计算机,计算机马上能猜出你心中的这个数;void main()
{
int a,b,c,d;
cout<<"enter anumber between 1 and 100."<<endl;
cout<<"your number divided by 3 has a remainder of"<<endl;
cin>>a;
cout<<"your number divided by 4 has a remainder of"<<endl;
cin>>b;
cout<<"your number divided by 7 has a remainder of"<<endl;
cin>>c;
cout<<"let me think a moment..."<<endl;
for(i=1;i<1500;i++) //消耗时间,不会写的哈
d=28*a+21*b+36*C;
while (d>105) d+d-105;
cout<<"your number was"<<endl;
}
这个程序出现了一些问题,不会的额
谢谢帮助哈 (*^__^*) 嘻嘻……