Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<string.h>
- int main()
- {
- int i,l,c,max=1;
- char s[1000005],a[1000005];
- while(scanf("%s",s))
- {
- if(!strcmp(s,"E-N-D"))
- break;
- l=strlen(s);
- c=0;
- for(i=0;i<l;i++)
- {
- if(s[i]>='a'&&s[i]<='z'||s[i]>='A'&&s[i]<='Z'||s[i]=='-')
- continue;
- else
- c++;
- }
- l=l-c;
- if(l>max)
- {
- max=l;
- strcpy(a,s);
- }
- }
- l=strlen(a);
- for(i=0;i<l;i++)
- {
- if(a[i]>='a'&&a[i]<='z'||a[i]=='-')
- printf("%c",a[i]);
- if(a[i]>='A'&&a[i]<='Z')
- printf("%c",a[i]+32);
- }
- printf("\n");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement