C C++ program to convert uppercase to lowercase

 

Coding in C

#include<stdio.h>
int main()
{
char ch;
printf(“Enter an uppercase letter: “);
scanf(“%c”,&ch);
ch=ch+32;
printf(“Lowercase = %c”,ch);
return 0;
}

 

Coding in C++

#include<iostream>
using namespace std;
int main()
{
char ch;
cout<<“Enter an uppercase letter: “;
cin>>ch;
ch=ch+32;
cout<<“Lowercase = “<<ch;
return 0;
}

 

Output

C C++ program to convert uppercase to lowercase

 

Published by

admin

I am a computer teacher, programmer and web developer