Simply use of " string.h " header file for the conversion of string
(note: user can only apply single word or character)
Source Code:-
#include<iostream.h>
#include<string.h>
#include<conio.h>
void main()
{ clrscr();
char str1[30],temp[30];
cout<<"Convert Lower to Upper case & Vice versa by-Tarun Rawat\n";
cout << "Enter the string: ";
cin >> str1;
strcpy(temp,str1);
cout<<"Upper Case String "<<strupr(temp) ;
cout<<"\nLower Case String "<<strlwr(temp) ;
getch();
}
No comments:
Post a Comment