Computer Science, asked by 1912028, 11 months ago

You have x no. of 5 rupee coins and y no. of 1 rupee coins. You want to purchase an item for amount z. The shopkeeper wants you to provide exact change. You want to pay using minimum number of coins. How many 5 rupee coins and 1 rupee coins will you use? If exact change is not possible then display -1. using python

Answers

Answered by lucky11364
0

Explanation:

here z is the price which we will enter..

X is the coin of 5

y is the coin of 1

Attachments:
Similar questions