So I’m making an app in my class using Codea. My teacher has explained to me that I need to use the fmod function to do something. SO, what the program does is it randomly generates a number ( 299 is the max number), and then I’m supposed to divide the number into tens hundreds and ones. Say the number is 177: I will save it as a variable, divide it by 100, and save the answer. Somehow using the fmod function, I’ll just chuck the remainder / decimal point so I know it’s a whole number: there is 1 hundred in 177. I need to somehow save that as a variable. Next, I would do the original answer (177) - (100*1) (1 comes from the number of hundreds there are which we got from the fmod function so I guess that would mean we’d need to get a variable for that too.) which is 17. Then to find the tens, I would divide 77 by 10, and go all fmod and chuck the remainder again. The answer is 7 tens in 77. I’d need to save 7, the amount of tens, as a variable somehow. Then I would do : 77 - (10 * 7) (to get the even 7 left over, because we need that to get the ones.). Finally we would do the 7/1 to find the ones, although I guess you could just use the remainder from the last thing to get the ones.

I have NO idea how to write this because I don’t understand how to use the fmod function and I’m SO confused. If I could get some help on this that’d be great :L Even an explanation would be great. Thanks Codea :)))