I am trying to write a program that asks the user to input a lowercase letter. The program should print out the uppercase version of the letter.
But I'm not allowed to have any if-statements or conditional logic in the code.
This is what I have so far:
#include iostream>
using namespace std;
int main() {
char lowerCase, upperCase;
cout << "Enter a lower case letter:" << endl;
cin >> lowerCase;
return 0;
}
Example Output: Enter a lower case letter: r
Upper case: R
Aucun commentaire:
Enregistrer un commentaire