My problem is that I need to write a program that asks the user to input a number from 1-99 and outputs the number spelled in english. I believe that I have the general outline down in that I will break it up into statements using If and Switch statements. I want the computer to recognize on class by having all numbers bigger than 9 but less than 20 in a class, which would require recognizing the first digit of a number. Thus the 20's would be in one class, the 30's in another, the 40's in another, etc.
Without having the user input two digits for a number separately, is there a way to recognize a first digit so that a general format would be If (first digit equals 1), else?
People here know more than I do. I would like to keep this to using only these basic directives.
using namespace std;
Edited by skips: n/a