回复:又见变态小学数学题
#include <iostream> iostream是啥?我只是学过#include <stdio.h>
using namespace std ; 不懂...这是c++的吧
int main() 主函数,int?
{
int a,b,c,d,e; 定义整形变量的?我在书学回来的
int ans1,ans2;
for(a = 0; a <= 8 ;a = a+2) 下面的都看不懂了..
{
for(b = 0; b <= 9 ;b++)
{
for(c = 0; c <= 9 ;c++)
{
for(d = 0; d <= 9 ;d++)
{
for(e = 0;e <= 9 ;e++)
{
ans1 = a*10000 + b*1000 + c*100 + d*10 + e;
ans2 = e*10000 + d*1000 + c*100 + b*10 + a;
if(ans2 == 4*ans1)
{
cout<<"a=" <<a<<endl;
cout<<"b=" <<b<<endl;
cout<<"c=" <<c<<endl;
cout<<"d=" <<d<<endl;
cout<<"e=" <<e<<endl<<endl;
}
}
}
}
}
}
return 0;
}

不懂得实在太多了