Have a choice to input 3 letters S or P or Q. I need to convert them to upper if user inputs lower cased letters.

... and so what's the difficulty?

i need to write a code to do that?? i dont know exactly how to form it. all i know is that it has to include toupper.

Did you google what the toupper function does? What parameters does it take etc.

yeah converts to upper case.


ex

char UPPER;
char QUIZES = 'Q';
char TESTS = 'T';

UPPER = toupper( 'Q', 'T');


will this work?

No, toupper only takes one parameter.

char upChar = toupper( 'c' ); // upChar = 'C'

it doesnt work :/

//First input
   cout << setw(63) << "S for squareroot P for Power Q to Quit: ";
   cin  >> LETTER;
   cout << "\n";
   
   UPPER = toupper( 's' );
   UPPER = toupper( 'p' );
   UPPER = toupper( 'q' );

   //If the input isnt Quit
   while (LETTER != 'Q')

what am i doing wrong?

Use toupper() on LETTER. That's your input.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.