How to convert Upper Case to Lower Case in C with Algorithm


 In this post, we will make a program to convert Upper Case to Lower Case in C.

(ads2)

Algorithm

1. We write Header File.

2. We declare character as upper, lower.

3. We declare Integer as n.

4. Then we will take input from the user in Upper Case.

5. Then we convert Upper Case to Lower Case by adding 32.

6. Then we print the Lower Case.


Rules

%c is Character.

&upper is to take input and show the output of the Upper Case value in the program.

We represent the Lower Case value as n.

(ads1)

Code

#include <stdio.h> 
int main()
{
    char upper, lower;
    int n;
    printf("Enter Upper Case:");
    scanf("%c", &upper);

    printf("You Entered:%c\n",upper);

    n = upper+32;
    printf("The lower limit is:%c",n);
}

Output

Enter Upper Case: A
You Entered: A
The lower limit is: a

Post a Comment

Previous Post Next Post