Find the ASCII Code of a Character

less than 1 minute read

The code has been modified slightly and now uploaded to the site.

Question

<— Return Home

49.cpp

#include <iostream>
using namespace std;

int main(){
    char input;

    std::cout << "Enter a character: \n";
    std::cin >> input;

    int value = input;

    std::cout << "The ASCII code for the character is " << value << "\n";
}

<— Return Home