Ask your own question, for FREE!
Computer Science 15 Online
OpenStudy (anonymous):

Visual Logic, anyone know a good place outside the book to learn it? I am stumped on a program for class.

OpenStudy (espex):

Is it the interface or the programming that is giving you fits?

OpenStudy (anonymous):

Actually, I just can't figure out how to make the equation work. In my book problem 1-6 says Write a program to assist a cashier with determining correct change. The program should have one input, the number of cents to return to the customer. The output should be the appropriate change in quarters, dimes, nickels and cents (ex. an input of 41 would produce an output of 1 quarter, 1 dime, 1 nickel and 1 penny). YOU MUST USE integer division (\) and integer remainder (mod) in your solution, subtraction, addition, and multiplication are NOT acceptable. Avoid doing multiple expressions within one assignment statement, keep it simple. I can get it to give me 16 quarters as change, but only using non-integer /

OpenStudy (anonymous):

And I think I might be trying to make it hard on myself. LOL I guess I dont need to program to tell me what the change is, only how to break the change down

OpenStudy (espex):

How have you attempted to break it down so far?

OpenStudy (espex):

In your exercise, the 41 cents can be divided, as an integer, by 25 to give you 1, 41%25 leaves you with 16. 16/10 gives you 1, 16%10 leaves 6...and so on and so forth.

OpenStudy (anonymous):

I'll try that, thanks

OpenStudy (anonymous):

It was Change MOD 25\10 and etc that ended up working, Thank you

OpenStudy (espex):

You're welcome.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!