#include<stdio.h>
void main()
{
char str[30];
int i;
printf("Enter the string:");
gets(str);
for(i=0;str[i]!='\0';i++)
{
if(str[i]>='A'&&str[i]<='Z')
{
str[i]=str[i]+32;
}
else
{
str[i]=str[i]-32;
}
}
printf("after manipulation of string:");
puts(str);
}
void main()
{
char str[30];
int i;
printf("Enter the string:");
gets(str);
for(i=0;str[i]!='\0';i++)
{
if(str[i]>='A'&&str[i]<='Z')
{
str[i]=str[i]+32;
}
else
{
str[i]=str[i]-32;
}
}
printf("after manipulation of string:");
puts(str);
}
No comments:
Post a Comment