ascii allowed in c++

#include <iostream>

int main() {
    // Declare variables to store user input and the sum
    char firstChar, secondChar;
    int sum;

    // Prompt the user to enter two ASCII characters
    std::cout << "Enter the first ASCII character: ";
    std::cin >> firstChar;

    std::cout << "Enter the second ASCII character: ";
    std::cin >> secondChar;

    // Calculate the sum of ASCII values
    sum = static_cast<int>(firstChar) + static_cast<int>(secondChar);

    // Display the result
    std::cout << "The sum of ASCII values is: " << sum << std::endl;

    return 0;
}