Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdlib.h>
- #include <stdio.h>
- #include <string.h>
- #include <ctype.h>
- int main(int argc, char *argv[]) {
- char text[] = "aoai 1skkfd 34kdwn 99";
- size_t len = strlen(text);
- printf("Digits: ");
- for (int i = 0; i < len; ++i) {
- char c = text[i];
- if (isdigit(c)) {
- printf("%c", c);
- }
- }
- printf("\n");
- return EXIT_SUCCESS;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement