~riderius/cpp-code

cpp-code/digit_or_letter.cpp -rw-r--r-- 269 bytes
380d65aariderius digits_analysis.cpp: argv[1] can replace n 11 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <iostream>

int main(void)
{
    using namespace std;

    char symbol;
    cin >> symbol;

    if ('A' <= symbol && symbol <= 'z')
        cout << "Letter";
    else if ('0' <= symbol && symbol <= '9')
        cout << "Digit";
    else
        cout << "?";
}