C program Accept character and check for lowercase,uppercase,special character,digit and convert it into another case,
C program Accept character and check for lowercase,uppercase convert it in to vice versa
#include
#include
void main()
{
char ch;
clrscr();
printf("Enter the any character=");
scanf("%c",&ch);
if(ch>96&&ch<122 font="">122>
{
printf("\n\n You entered Lowercase alphabet character.");
}
if(ch>64&&ch<91 font="">91>
{
printf("\n\n You entered Uppercase alphabet character.");
}
if(ch>32&&ch<48 ch="">57&&ch<65 ch="">91&&ch<97 font="">97>65>48>
{
printf("\n\n You entered Speacial character.");
}
if(ch>47&&ch<58 font="">58>
{
printf("\n\n You entered value is a Digit.");
}
if(ch>64&&ch<91 font="">91>
{
printf("\n\n\n The Lowercase character is=%c",ch+32);
}
if(ch>96&&ch<123 font="">123>
{
printf("\n\n\n The Uppercase character is=%c",ch-32);
}
getch();
}
#include
#include
void main()
{
char ch;
clrscr();
printf("Enter the any character=");
scanf("%c",&ch);
if(ch>96&&ch<122 font="">122>
{
printf("\n\n You entered Lowercase alphabet character.");
}
if(ch>64&&ch<91 font="">91>
{
printf("\n\n You entered Uppercase alphabet character.");
}
if(ch>32&&ch<48 ch="">57&&ch<65 ch="">91&&ch<97 font="">97>65>48>
{
printf("\n\n You entered Speacial character.");
}
if(ch>47&&ch<58 font="">58>
{
printf("\n\n You entered value is a Digit.");
}
if(ch>64&&ch<91 font="">91>
{
printf("\n\n\n The Lowercase character is=%c",ch+32);
}
if(ch>96&&ch<123 font="">123>
{
printf("\n\n\n The Uppercase character is=%c",ch-32);
}
getch();
}