Home > Back-end > Where is wrong just learning don't understand, didn't see where I went wrong
Where is wrong just learning don't understand, didn't see where I went wrong
Time:06-02
Thanks for a great god to show something wrong
CodePudding user response:
Post code directly
CodePudding user response:
After the judge d==a should give d a 0, otherwise, d every time is based on the value of the last time to add,
CodePudding user response:
# include & lt; stdio.h> Void qinmishu (); Int main (int arg c, char * argv []) { Qinmishu (); return 1; }
Void qinmishu () { Int a, b, s, c=0, d=0; For (a=1; A<=500; +) { For (b=1; B{ If (a % b==0) { C=c + b; } } For (s=1; S{ If (c % s==0) { D +=s; } } If (d==a & amp; & A{ Printf (" % d % d \ n ", a, c); } C=0; D=0; }