#include<stdio.h>
main()
{
    char s[50];
    int i;
    printf("enter a string");
    gets(s);
    i=0;
    while(s[i]!='\0')
    {
        if(s[i]>=97&&s[i]<=122)
        {
            s[i]=s[i]-32;
        }
        i++;
    }
    printf("the string in upper case letters is:");
    puts(s);
}
     
           
Note: Need to be arranged in compiler after copied
   

 OutPut:

enter a string computer the string in upper case letters is:COMPUTER