subject

Once upon a time there was a country called plusplusland. the monetary system they used there was simple: the currency name was the "plussar" and their central bank issued five different banknotes of values 50, 20, 10, 5 and 1 plussar. your task is to write a program for the atms of plusplusland. the program should find the minimal number of banknotes needed to deliver any amount of money to the client. the treasury minister has asked you personally to do this. he expects your code to print the values of all the needed banknotes in a row – this is the format accepted by all atms in plusplusland. your program will require the use of an integer array combined with different loops to process the currency. test your code using the sample data provided input125example output50 50 20 5example input127example output50 50 20 5 1 1example input49example output20 20 5 1 1 1 1(hint: here is an array that maybe for all known banknotes ordered from the most valuable to the leastint banknotes[] = {50, 20, 10, 5, 1} and then use your skill with array related processing combining different kinds of loops)

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 23:00
Fast sportcars the top speeds of sportscars, given in miles per hour, are: 155 mph bmw m5 217 mph lamborghini aventador spyder 205 mph ferrari 488 205 mph nissan gtr 197 mph chevrolet corvette stingray zr1 258 mph bugatti veyron supersport 195 mph dodge viper 270 mph hennessey venom 155 mph bmw m3 195 mph mercedes sl given: topspeeds=[155; 217; 205; 205; 197; 258; 195; 270; 155; 195]; carnames=string(["bmw m5" "lamborghini aventador spyder" "ferrari 488" "nissan gtr" "chevrolet corvette stingray zr1" "bugatti veyron supersport" "dodge viper" "hennessey venom" "bmw m3" "mercedes sl"]); the variable is a rectangular array. write a function called selectcars to identify cars with the top speed within a given range, and display the identified names. the selected cars speed will be in a range given by lowerbound < speed < upperbound. inputs to the function selectcars are: a column array os all car top speeds named topspeeds, the corresponding chara
Answers: 2
question
Computers and Technology, 21.06.2019 23:00
What is one of the main problems that can occur when implementing a large number of new systems within an organization?
Answers: 1
question
Computers and Technology, 22.06.2019 21:00
Ulia is planning to attend the same private four-year college her parents attended. she wants to save at least $18,000 in four years to contribute to her college education. which monthly deposit amounts can julia use to achieve her goal? check all that apply.
Answers: 2
question
Computers and Technology, 23.06.2019 10:00
Whats three fourths of 15(this is supposed to be in math but i clicked too fast)
Answers: 1
You know the right answer?
Once upon a time there was a country called plusplusland. the monetary system they used there was si...
Questions
question
Mathematics, 30.10.2020 05:10
question
Health, 30.10.2020 05:10
question
Mathematics, 30.10.2020 05:10
question
Business, 30.10.2020 05:10
Questions on the website: 13722359