Write a program that inputs a number between 1 and 1000 and displays the number with the appropriate two-letter ending. I have been working on this problem for two days now and am getting nowhere. This is what need to do
FOR 1 to 1000
if the second-last character is 1 (Numbers 10-19) ad "th"
For all others if last character is 1 add "st"
Last character 2 add "nd"
Last Character 3 add "rd"
And for all others add "th"
I am at a loss of figuring out how to input it the information in a way that the program will understand, please help!
FOR 1 to 1000
if the second-last character is 1 (Numbers 10-19) ad "th"
For all others if last character is 1 add "st"
Last character 2 add "nd"
Last Character 3 add "rd"
And for all others add "th"
I am at a loss of figuring out how to input it the information in a way that the program will understand, please help!