aboutsummaryrefslogtreecommitdiff
path: root/week03/exercise03.cpp
blob: bc7879b4552cd0faa12ba0ea0cc9890e3035cd6a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <iostream>

int main() {
	char input;
	std::cin >> input;
	while (input != '^') {
		if (('A' <= input && input <= 'Z') ||
		    ('a' <= input && input <= 'z')) {
			std::cout << "letter" << std::endl;
		}
		else if ('0' <= input && input <= '9') {
			std::cout << "digit" << std::endl;
		}
		else {
			std::cout << "other" << std::endl;
		}
		std::cin >> input;
	}
}