Thursday 23 January 2014

Filled Under:

/* WAP to convert the given character into uppercase if it is in lowercase and viceversa */

/* WAP to convert the given character into uppercase if it is in lowercase and viceversa */

#include<stdio.h>
#include<conio.h>
void main()
{
    char ch;

    printf("Enter a character:");
    scanf("%c",&ch);

    if(ch>='a' && ch<='z')
        printf("The uppercase character of %c is %c",ch,ch-32);
    else
        printf("The lowercase character of %c is %c",ch,ch+32);

    getch();
}

0 comments:

Post a Comment