#include <stdio.h>
#include<conio.h>
void main()
{
char c;
clrscr();
printf("Enter u to display characters in uppercase and l to display in lowercase: ");
scanf("%c",&c);
if(c=='U' || c=='u')
{
for(c='A'; c<='Z'; ++c)
printf("%c ",c);
}
else if (c=='L' || c=='l')
{
for(c='a'; c<='z'; ++c)
printf("%c ",c);
}
else{
printf("Error !!!");
printf("Enter only u or l char!!")
}
getch();
}
#include<conio.h>
void main()
{
char c;
clrscr();
printf("Enter u to display characters in uppercase and l to display in lowercase: ");
scanf("%c",&c);
if(c=='U' || c=='u')
{
for(c='A'; c<='Z'; ++c)
printf("%c ",c);
}
else if (c=='L' || c=='l')
{
for(c='a'; c<='z'; ++c)
printf("%c ",c);
}
else{
printf("Error !!!");
printf("Enter only u or l char!!")
}
getch();
}
No comments:
Post a Comment