C++/asdasdasdasd
Expert: Tehreem - 1/10/2012
Questioninput:paulo hariramani
output:Paulo Hariramani
using string manipulation
AnswerThis is a program to convert lower case to upper case characters. You can apply simple programming technique to get your desired result.
// convert the string to upper case letters
# include <iostream>
using namespace::std;
void makeUpper(char str[])
{
char i=0;
while (str[i]!=0)
{
if (str[i]>'a'||str[i]<'z')
cout<<static_cast<char>(static_cast<int>(str[i])-32);
i++;
}
cout<<endl;
}
int main (void)
{
char string[10];
cout<<"Enter a word ";
cin>>string;
makeUpper(string);
return 0;
}
Try this and tell me if you succeed. I will be glad to hear that. However, if you encounter any problem, you can ask me.
Regards