Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <locale.h>
- ////////////////////////////////////////
- int main() //
- {
- int a = 753; // 7 + 5 + 3 = 15
- int b = 0;
- int sum = 0;
- sum = sum + a%10;
- a = a/10;
- sum = sum + a%10; // 8
- a = a/10;
- sum = sum + a%10; // 8
- printf("sum = %d\n", sum);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement