Welcome..!!

Please visit http://csprograms.in/ for more Computer Science programs.

Wednesday 14 March 2012

18. C++ program to convert a string into upper-case or lower-case .


# include < iostream>
# include < string>
int main()
{
char str1 [30], temp[30];
cout < < “Enter the string:”;
cin > > str1;
strcpy ( temp, str1);
cout < < “strupr ( temp ) : “ < < strupr (temp) < < end1;
cout < < “strlwr (temp) : “ < < strlwr ( temp) < < end1;
return 0;
}

No comments:

Post a Comment