Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <ctype.h>
- #include <string.h>
- #define max 100
- int main()
- {
- char c;
- int suma = 0;
- int pom;
- while((c=getchar()) != '\n') {
- if(c>=0 && c<=9) {
- suma += atoi(c);
- }
- }
- printf("%d\n", suma);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement