Write a program to convert uppercase to lowercase letters by MistarAV
#include <iostream>
#include <cstring>
using namespace std;
int main(){
char s[20];
int i;
cout<<"Enter the String in uppercase: ";
cin>>s;
for(i=0;i<=strlen(s);i++) {
if(s[i]>=65 && s[i]<=92)
{
s[i]=s[i]+32;
}
}
cout<<"The entered string in lowercase: "<<s;
return 0;
}
Output
Enter the String in uppercase: A
The entered string in lowercase: a
Comments
Post a Comment