An ATM has the denomination of Rs.2000, Rs.500, Rs.200, Rs.100. Write a code to find minimum...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
An ATM has the denomination of Rs.2000, Rs.500, Rs.200, Rs.100. Write a code to find minimum no. of notes can be disbursed by the machine for the requested amount assuming sufficient currency and all denominations are available. Input Format: A single integer represent the amount. Output Format: An integer represents the minimum number of notes can be disbursed. Example: Input: 9800 Output: Explanation: 4*2000+3*500+1*200+1*100 which gives 4+3+1+1 = 9 An ATM has the denomination of Rs.2000, Rs.500, Rs.200, Rs.100. Write a code to find minimum no. of notes can be disbursed by the machine for the requested amount assuming sufficient currency and all denominations are available. Input Format: A single integer represent the amount. Output Format: An integer represents the minimum number of notes can be disbursed. Example: Input: 9800 Output: Explanation: 4*2000+3*500+1*200+1*100 which gives 4+3+1+1 = 9
Expert Answer:
Posted Date:
Students also viewed these programming questions
-
Write a code to implement the Radix Sort. It depends on the user which sorting algorithm user wants to create? Program takes the input from the user and then store the elements in the array andthen...
-
Write a code to transmit a two bytes data from one microcontroller to another using UART and get it back from the receiver at 9600 bps. Draw schematics.
-
Write a program that receives an ASCII code (an integer between 0 and 127) and displays its character. For example, if the user enters 97, the program displays the character a. Here is a sample run:...
-
The tasks must you complete as part of building the subledger applications while implementing Oracle Accounting Hub Cloud? Explain.
-
What steps could Digg have taken, throughout the life of its business, to enable it to remain competitive and still be a successful firm today?
-
A tissue manufacturer that has the fourth-largest market share plans to experiment with a 50 off coupon during November and a buy one, get one free coupon during December. The experiment will take...
-
You want to retire in 30 years. You are starting to invest in a growth income fund that promises an ambitious rate of $15 \%$. You can put in $\$ 200$ per month. How much will you have in 30 years?
-
You are asked to do a study of shelters for abused and battered women to determine the necessary capacity in your city to provide housing for most of these women. After recording data for a whole...
-
2. Determine two different row-echelon forms for the following augmented matrix: - 3. Reduce the following augmented matrix to row-echelon form. Make sure that there are no fractions in the final...
-
Locate the most recent committee reports associated with each of the following code sections (if any) using a tax service such as Checkpoint. Give the citation to the committee report, the Public Law...
-
On Fig. 1 the optical axis and one ray from point A to point B trough a thin lens are depicted. By geometrical raytracing find: 1) type of the lens (convex or concave), 2) position of the principle...
-
Identify an organization of your choice and analyze in detail its information technology strategy. Discuss the information technology governance model/framework of the company.
-
A company is currently evaluating a project which requires investments of 11 700 dollars now, and 6 200 dollars at the end of year 1. The cash inflow from the project will be 17 900 dollars at the...
-
Cathy May deposits $15,000 at the end of each year for 10 years in an account paying 8% compounded annually. She then puts the total amount on deposit in another account paying 9% compounded...
-
Kim has taken a big step toward saving for her house. She has accumulated $56,750.00 for her down payment. Kim began with an initial investment of $25,000.00. She has been investing for 9 years. What...
-
A 0.36 m3 drum contains 140 L of a dilute solution of trichloroethylene (TCE) in water. The concentration of TCE in the headspace (gas phase) above the water was measured to be 0.0221 atm. Henry's...
-
The fisherman on the boat moves up the river. Under the bridge, he drops a bottle into the water. Half an hour later, the fisherman turns back, moves down the river and finds the bottle 5 km down the...
-
A bar of a steel alloy that exhibits the stress-strain behavior shown in Figure 6.22 is subjected to a tensile load; the specimen is 375 mm (14.8 in.) long and has a square cross section 5.5 mm (0.22...
-
This exercise, like the last, requires the use of the CES Edu-Pack Materials Selection software. a. Use CES to select a surface-treatment process to meet the following requirements. b. Use CES to...
-
This exercise and the next require the use of the CES Edu-Pack Materials Selection software. a. Use CES to select a joining process to meet the following requirements. b. Use CES to select a joining...
-
A method is sought to mould the wide-necked containers show in the image. It suggested that they might be blow-moulded, injection moulded or rotation moulded. The table lists approximate values for...
Study smarter with the SolutionInn App