79. Check if the String Numeric or Alphabetic

You are given a null-terminated input string.

Your task is to:

  • Print "NUMERIC" if the string contains only digits (0–9)
  • Print "ALPHABETIC" if the string contains only letters (A–Z, a–z)
  • Otherwise, print "MIXED" if it contains anything else (symbols, mix of digits and letters)

Do not use standard library functions like isdigit() or isalpha().

Use only ASCII value checks.

 

Example-1

Input: "123456"
Output: NUMERIC


Example-2

Input: "firmwareC"
Output: ALPHABETIC


Example-3

Input: "C99"
Output: MIXED


Example-4

Input: "Hello!"
Output: MIXED


Example-5

Input: ""
Output: MIXED (empty string is considered mixed)


 

Loading...

Input

123456

Expected Output

NUMERIC