January 29th, 2013, 09:20 PM
[raptor] rem and floor functions
New to programming and taking a intro course in college. We're using raptor which is flow chart type program. the gist is i need to write something that takes an amount of change in pennies then converts it to exact change in quarters, dimes, nickels and pennies and spits out an output showing exact change. i know you would divide total by 25 take remainder than 10 then 5 etc...
i would put down what i've tried but i'm not even close. just as a sketch: i've attempted to have the assignments a couple of ways: for instance do one called quarter and give it a value of 25 but i've also tried naming it quarter and then giving it an expression of "floor (total_change /25)" but then of course, i have no remainder. I'm stumped as to how i'm supposed to get the remainder to go to the next assignment. hope somebody understands this.
the only hints i got on this are to use floor and rem.