CodePudding user response:
Method a, the most stupidFrom 100 to 999 cycle and then took out each bit is added up to 5
Method 2
For (x=1; x<=5; X++)
For (y=0; Y<=5 - x; Y++)
Printf (" % d \ n ", x * 100 + y + 10 + 5 - x, y);
CodePudding user response:
Printf (" % d \ n ", x * 100 + y * 10 + 5 - x, y);