write a C++ program that prompt user to input a character and convert the character to the ASCII number
#include <iostream>
int main() {
std::cout << "Enter character: ";
char c = ' ';
std::cin >> c;
std::cout << "ASCII number: " << int(c) << std::endl;
return 0;
}
Comments
Leave a comment