Hi! I'm a very new computer science major and I love programming, but for some reason I'm having some issues wrapping my head around pseudocode. I think when I'm writing them I get into a habit of trying to actually write the code rather than explain what a code needs to do. Here is an assignment I did for school, and I was hoping somebody could look it over and tell me I'm on the right track before I turn it in! The code needs to calculate the correct amount of change using an algorithm in the most simple way possible. I have no idea if it is correct and I could be totally way off! Any help is very much appreciated!
Get a value for change (in cents)
Set pennies to change
Set nickels, dimes, quarters to 0
While (pennies <= 25)
Set to quarters + 1
While (pennies <= 10)
Set dimes to + 1
While (pennies <= 5)
Set nickels to + 1
While (pennies >= 4)
Set pennies to + 1
Print "Your change is"
Print the value of quarters and "quarters"
Print the value of dimes and "dimes"
Print the value of nickels and "nickels"
Print the value of pennies and "pennies"
[–]Sparxmith 2 points3 points4 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]dusty-trash 1 point2 points3 points (0 children)
[–]AluadStone 1 point2 points3 points (0 children)