Wednesday, April 7, 2021

18.30. Write a function that gets a string and convert it to lower case.

#include<stdio.h>
#include<conio.h>
int Lower(char st[])
{
int i;

for(l=0;st[i];i++);
if(st[i]>='A'&& st[i]<='Z')
st[i]=st[i]+32;
}
void main ()
{
char st[100];
clrscr();
printf("Enter any line of text: ");
gets(st);
Lower(st);
printf("Lower of the line is: %s",st);
getch ();
}

No comments:

Post a Comment