Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*Bismillah*/
- #include<stdio.h>
- #include<string.h>
- int main()
- {
- char s[1500];
- while(1)
- {
- gets(s);
- if(s[0]=='*')
- {
- break;
- }
- else
- {
- int l,i,flag=1;
- char c[2];
- l=strlen(s);
- if(s[0]>=65&&s[0]<=90)
- c[0]=s[0]+32;
- else if(s[0]>=97&&s[0]<=122)
- c[0]=s[0]-32;
- for(i=1;i<=l;i++)
- {
- if(s[i]==' ')
- {
- if(s[i+1]==s[0]||s[i+1]==c[0])
- {
- continue;
- }
- else
- {
- flag=0;
- break;
- }
- }
- }
- if(flag==1)
- printf("Y\n");
- else
- printf("N\n");
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement