Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- int intsInString(char str[])
- {
- int i;
- for(i=0; str[i]!='\0'; i++)
- {
- if(str[i]>='0' && str[i]<='9')
- {
- printf("%c", str[i]);
- if(str[i+1]>'0' || str[i+1]<='9')
- printf(" ");
- }
- }
- }
- int main()
- {
- char str[]="45abdf3244";
- intsInString(str);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement