64 679
Assignments Done
99,2%
Successfully Done
In September 2018

Answer to Question #17597 in C++ for nwary

Question #17597
/*Write a program that will
1- read a lower case character letter from the user.
The program supposed to
2 - convert the input character to upper case and display both input and output characters.
3- The conversion from lower case should be done using a user-defined function called convChar().

Note: to convert a character from lower case to upper case you need to subtract 32.

*/
Expert's answer
#include <iostream>
#include <conio.h>
using namespace std;void convChar(char ch){
cout<<"Enteredchar: " << ch << endl;
cout<<"Convertedchar: " << ch-32 << endl;
}
int main ()
{
charch;
cout<<"entera character"<<endl;
cin>>ch;
convChar(ch);
system("pause");
return0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions