#include<stdio.h>
#include<conio.h>
void main()
{
char s1[20];
int i=0;
clrscr();
printf("enter the string\n");
gets(s1);
while(s1[i])
{
if(s1[i]>='A'&& s1[i]<='Z')
s1[i]=s1[i]+32;
else if(s1[i]>='a' && s1[i]<='z')
s1[i]=s1[i]-32;
i++;
}
puts(s1);
getch();
}
#include<conio.h>
void main()
{
char s1[20];
int i=0;
clrscr();
printf("enter the string\n");
gets(s1);
while(s1[i])
{
if(s1[i]>='A'&& s1[i]<='Z')
s1[i]=s1[i]+32;
else if(s1[i]>='a' && s1[i]<='z')
s1[i]=s1[i]-32;
i++;
}
puts(s1);
getch();
}
No comments:
Post a Comment