Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main(void) {
- char *buf = (char *) malloc(BUFSIZ);
- char *p = buf;
- int i, sum = 0;
- do {
- for (i = 0; i < 8; i++) { scanf("%c", p); sum += *p; p++; }
- getchar();
- } while (sum % 10 != 0);
- p = '\0'; printf("%s\n", buf);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement