Write a program which takes as input an integer from the user, and displays the corresponding character. For example if the user enters 65, 'A' would be shown on the screen. The program should also take as input a lowercase character and then displays the uppercase form of it. For example if the user enters 'a', 'A' would be shown on the screen. The program should also make a beep sound before ending.
1
Expert's answer
2020-11-29T23:49:17-0500
#include <iostream>
using namespace std;
int main() {
char c;
int x;
cin >> x;
cout << char(x) << '\n';
cin >> c;
c = 'A' + (c - 'a');
cout << c << '\n' <<'\a';
}
Comments
Leave a comment