What Type Is It? (Data Types)
Read one token. Print integer if it is a whole number (optional leading -), decimal if it is a number with one . and digits on both sides, otherwise text.
Input: One token without spaces.
Output: integer, decimal or text.
Difficulty: Easy. Write your answer in the browser editor, run the examples, then submit it against hidden tests. Python and JavaScript are free; other languages are part of licode Club.
Hint
- Check characters one by one, or try converting and catch the failure.