Write a program to convert a string in lowercase

Write a C++ Program to Convert a String in Lowercase

Write a program to convert a string in lowercase

Object: Write a program to convert a string in lowercase. C++ Projects.

Code:

#include<iostream>
#include<conio.h>
#include<string>
using namespace std;
void main()
{
string tex;
int i;
cout<<“Enter the text in Upper case: “;
getline(cin,tex);
for(i=0;i<tex.length();i++)
{
tex[i]=tolower(tex[i]);
}
cout<<“Lower case is :”<<tex;
getch();
}

Output:

Write a program to convert a string in lowercase

M.A Siddiqui

Hi, I am M.A Siddiqui. I'm a Computer Science Student, In this website, I'm teaching you Multiple languages and provides Projects and other Subjects Notes.

You may also like...

1 Response

  1. June 14, 2020

    […] Write a program to convert a string in lowercase […]

Leave a Reply

Your email address will not be published. Required fields are marked *