Q4 Consider a currency system in which there are notes of seven denominations, namely, Rs. 1, Rs. 2, Rs. 5, Rs. 10, Rs. 50, Rs. 100. If a sum of Rs. N is entered through the keyboard, write a program to computer the smallest number of notes that will combine to given Rs. N.

Program: 63

Consider a currency system in which there are notes of seven denominations, namely, Rs. 1, Rs. 2, Rs. 5, Rs. 10, Rs. 50, Rs. 100. If a sum of Rs. N is entered through the keyboard, write a program to computer the smallest number of notes that will combine to given Rs. N.

Output

 Enter the sum of rupees: 1221
  Rs 100 = 12
  Rs 50 = 0
  Rs 10 = 2
  Rs 5 = 0
  Rs 2 = 0
  Rs 1 = 1

Lokesh Kumar

Being EASTER SCIENCE's founder, Lokesh Kumar wants to share his knowledge and ideas. His motive is "We assist you to choose the best", He believes in different thinking.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.