Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <ctype.h>
- int main()
- {
- char c[100];
- int i=0,j=0;
- char l;
- while((l=getchar())!='\n')
- {
- *(c+i)=l;
- i++;
- }
- *(c+i)='\0';
- for(i=0;*(c+i)!='\0';i++)
- {
- if(isdigit(*(c+i)))
- {
- *(c+j)=*(c+i);
- i++;j++;
- while(!isdigit(*(c+i))&&*(c+i)!='\0')
- {
- *(c+j)=*(c+i);
- i++;
- j++;
- }
- *(c+j)=*(c+i);
- *(c+j+1)='\0';
- break;
- }
- }
- if(j==0)
- {
- printf("Nema cifri");
- }
- else
- {
- printf("%s",c);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement