#include<stdio.h>
int main()
{
char str[50];
int i;
printf("\nEnter a string : ");
scanf("%s",&str);
for(i=0;str[i]!='\0';i++)
{
if(str[i]>='a'&&str[i]<='z')
{
str[i]=str[i]-32;
}
}
printf("\nString in Upper Case = %s",str);
for(i=0;str[i]!='\0';i++)
{
if(str[i]>='A'&&str[i]<='Z')
{
str[i]=str[i]+32;
}
}
printf("\nString in Lower Case = %s",str);
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: