# Include <stdio. h> int main () {// defines the two integers int A and B to be read; // defines the array int D used for release and removal [9]; // read two integers scanf ("% d", & A, & B); // sum int ans = a + B; // if the sum is a negative number, output a negative number, and convert the sum to a positive number. If (ANS <0) {printf ("-"); ans =-ans;} // if the sum is smaller than 1000, directly output if (ANS <1000) {printf ("% d \ n", ANS);} else {// intends to split this and int zz = 0; while (ANS> = 1000) {d [zz] = ans % 1000; // obtain the remainder. The remainder is first placed in the array ++ ZZ; // array subscript + 1 ANS/= 1000; // operator} d [zz] = ans; // put the operator after calculation into the last printf ("% d", d [zz]) of the array; // first output vendor // inverted output for (INT I = zz-1; I> = 0; I --) {printf (", % 03d ", d [I]) ;}} return 0 ;}
The final running result is as follows: