Answer to Question #237233 in C++ for tttt

Question #237233

write a C++ program that prompt user to input a character and convert the character to the ASCII number


1
Expert's answer
2021-09-14T18:25:24-0400
#include <iostream>

int main() {
    std::cout << "Enter character: ";
    char c = ' ';
    std::cin >> c;
    std::cout << "ASCII number: " << int(c) << std::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