- #include <stdio.h>
- int main()
- {
- char ch[106];
- int i,j,ck=1;
- scanf("%s",ch);
- for(i=1;ch[i]!='\0';i++)
- {
- if(ch[i]>=97&&ch[i]<=122)
- {
- ck=0;
- break;
- }
- }
- if(ck==1)
- {
- if(ch[0]>=65&&ch[0]<=90)
- ch[0]=ch[0]+32;
- else
- ch[0]=ch[0]-32;
- for(j=1;ch[j]!='\0';j++)
- {
- ch[j]=ch[j]+32;
- }
- }
- printf("%s\n",ch);
- return 0;
- }
Wednesday, January 22, 2020
Codeforces 131A cAPS lOCK Solution in C
Subscribe to:
Post Comments (Atom)
Codeforces 131A cAPS lOCK Solution in C
#include <stdio.h> int main () { char ch [ 106 ]; int i , j , ck = 1 ; scanf ( "%s" , ch ); ...
-
#include <stdio.h> #include <string.h> int main () { int i , n , l = 0 ; char a [ 120 ]; scanf ( ...
-
#include <stdio.h> int main () { int o , n , a , b , c , s , t , u ; s = 0 ; t = 0 ; u = 0 ...
-
#include <stdio.h> #include <string.h> int main () { int i , n , p = 0 ; char s [ 120 ]; scanf ( ...
No comments:
Post a Comment