Kodewick
Start learning →
Starter←→0 / 86

A Letter and Its Number

#066Startercout << c, (int)c3 min

A computer stores a letter as a number. c holds the letter A. Show the letter first, then its number. Two lines, one each.

Should show
A
65
main.cpp
#include <iostream>
using namespace std;

int main() {
    char c = 'A';
    // your code here: show the letter in c
    // your code here: show the number behind c
    return 0;
}
Ctrl + Enter runs too
Result

Run tries the examples. When they look right, Submit.