1
Answer

math functions

Photo of angelo3pete

angelo3pete

20y
1.6k
1
I cannot figure out how to take a number from 1 to a 1000 and have the appropriate ending put on it. The last >=4 to 20 is th and ...the 3 ending is rd and the 2 is ND and the 1 is st I think the mod function has a role in this. But how do you tell it to take the number from input figure out the ending and apply accordingly EXAMPLE WOULD BE 191ST OR 823RD OR 498TH 982ND THIS IS MY PROBLEM??????? ANYONE OUT THERE WHO CAN HELP ME PLEASE DO SO. I HAVE SPENT HOURS UPON HOURS AND CANNOT GET IT. PLEASE HELP.

Answers (1)

0
Photo of elnerdo
NA 38 0 20y
all you wanna do is put the appropriate letter endings on numbers? is that really that important? i've seen plenty of very official programs use St or Rd or Th or Nd for all the numbers. but if u really need it for some reason the only thing i can think of off the top of my head is just going throuh every number.. if num = 1 then textbox1.text = num&"st" if num= 2 then textbox1.text = num&"nd" if num = 3 then textbox1.text = num&"rd" if num = 4 then textbox1.text = num&"th" if num = 5 then textbox1.text = num&"th" if num = 5 then textbox1.text = num&"th" if num = 6 then textbox1.text = num&"th" if num = 7 then textbox1.text = num&"th" if num = 8 then textbox1.text = num&"th" if num = 9 then textbox1.text = num&"th" if num = 10 then textbox1.text = num&"th" if num = 11 then textbox1.text = num&"th" if num = 12 then textbox1.text = num&"th" if num = 13 then textbox1.text = num&"th" if num = 14 then textbox1.text = num&"th" if num = 15 then textbox1.text = num&"th" if num = 16 then textbox1.text = num&"th" if num = 17 then textbox1.text = num&"th" if num = 18 then textbox1.text = num&"th" if num = 19 then textbox1.text = num&"th" if num = 20 then textbox1.text = num&"th" if num = 21 then textbox1.text = num&"st" sorry that i can't be of any help