zmlink wrote: |
---|
im not understanding what it is exactly the pseudocode wants me to do here |
not supprised that psudocode is awfull
Start = int main()
// Declarations
// num dollars
// output "Please enter the a whole dollar amount (no cents!). Input 0 to terminate: "
// input dollars
// while ( dollars <> 0) enter a while loop you need to decide which to use while(dollars > 0) or while (dollars < 0)
// displayBills(dollars) //this is a function call which means you need to make a function called displayBills
// output "Please enter the a whole dollar amount (no cents!). Input 0 to terminate: "
// input dollars
// endwhile
// Stop
//
----------------------------------------------------------------------------------------
//this should be in its own function
displayBills(num dollars) beginning of function
// Declarations
// num ones
// num fives
// num tens
// num twenties
// num temp
//these calculations are used to calculate differant dollars
// twenties = dollars / 20 calculates the amount of twenties in dollars
// temp = dollars % 20 calculates the remainder after the twenties are removed
// tens = temp / 10 ect
// temp = temp % 10 ect
// fives = temp / 5
// ones = temp % 5
/
//output the amount of each type of dollars
/ output "The dollar amount of ", dollars, " can be represented by the following monetary denominations"
// output " Twenties: ",
// output " Tens: ", tens
// output " Fives: ", fives
// output " Ones: ", ones
// return
output should look like
Twenties: 5
Tens: 5
Fives: 5
Ones: 5 |