nahidhasan110

lower to upper

Dec 7th, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.37 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<string.h>
  3. int main()
  4. {
  5.     char st[50],st1[50];
  6.     gets(st);
  7.     int i,l;
  8.     l=strlen(st);
  9.     for(i=0;i<l;i++)
  10.     {
  11.         if(st[i]>=97 && st[i]<=122)
  12.         {
  13.             st1[i]=st[i]-32;
  14.         }
  15.         else
  16.         {
  17.             st1[i]=st[i];
  18.         }
  19.     }
  20.     st1[i]='\0';
  21.     printf("%s",&st1);
  22.     return 0;
  23. }
Add Comment
Please, Sign In to add comment