100./*Write
a program to print a string and its change*/
#include<stdio.h>
#include<conio.h>
main()
{
char n[20];
int j;
clrscr();
printf("Enter a string");
gets(n);
for(j=0;n[j]!='\0';j++)
{
if(n[j]>=65 &&
n[j]<=90)
printf("%c",n[j]);
else
if(n[j]>=97 &&
n[j]<=122)
printf("%c",n[j]-32);
else
printf("%c",n[j]);
}
getch();
}
OUTPUT
Enter a
string : tejkumar saharan
TEJKUMAR
SAHARAN
No comments:
Post a Comment