幫我想想怎麼做這個C++
#include<iostream.h>
main()
{
int a=1,b,c,d=0,e=1,f,g,h=0,i=d;
while (a<300)
{
d=0;
b=1;
while (b<300)
{
c=a%b;
******if(c==0 && a>b)
{
d+=b;
cout<<a<<"%"<<b<<"="<<d<<endl;
}*******
b++;
}
a++;
}
while (e<300)
{
h=0;
f=1;
while (f<300)
{
g=e%f;
********if(g==0 && e>f)
{
h+=f;
}********
f++;
}
e++;
}
return 0;
}
我要怎麼把*號的範圍拿出來做[if]阿~~會的教一下吧~* *
|