Answer to Question #280654 in C for Tharu

Question #280654

(1) Please enter any character from the keyboard.

(2) Please let the computer output two lines: the first line is in the form of characters, 3 characters are output, the 3 characters are separated by commas, and the second line is the ASCII code corresponding to the output characters.


1
Expert's answer
2021-12-17T06:51:55-0500
#include <iostream>

using ​namespace std;

int main() {
 ​char c; cin >> c;
 ​cout << c << " - " << (int) c << endl;
 ​return 0;

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 the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS