She asked the cashier to give her 500 ant
2000 currency notes in return. She got 125 currency notes in all. Find the number of each kindd
currency notes.
8. The sum of the digits of a 2-digit number is 6. On reversing its digits, the number is 18 less than the
original number. Find the number.
9. The sum of the digits of
Answers
Answered by
0
Answer:
Using User-Defined Function
1) Read the entered amount and put it in the variable m. 2) The user-defined function denomination will divide the amount in to 500,100,50,20,10,5,2,1 rupees notes. Int array a[8]={500,100,50,20,10,5,2,1}.
Answered by
0
- Let the number of 500 rupee notes be x
- Let the number of 2,000 rupee notes be y
- According to the question,
- 500x + 2,000y = 2,00,000
- => x + 4y = 400
- => x = 400 - 4y (1)
- Also,
- x + y = 250
- Substituting value of x from (1),
- 400 - 4y + y = 250
- => -3y = -150
- => y = 50
- Putting value of y in (1),
- 400 - 4 (50)
- = 400 -200
- =200
- The number of 500 rupee notes = 200
- The number of 2000 rupee notes = 50
- Let the digit at one's place be x
- The sum of the digits is 6
- Let the digit at ten's place be (6-x)
- Let the value of the unit digit be x*1=x
- let the value of the ten's digit be (6-x)*10
- =60-10
- original number= 60-10x+x =60-9x
- on reversing the digits = 6-x*1 + x*10
- 6-x+10x
- 6+9x
- ATQ
- (60-9x)-18 = 6+9x
- 60-18-6 = 9x+9x
- 36 = 18x
- x = 36/18
- x = 2
- So, therefore the original no is
- (6-x)*10 + (x)*1
- (6-2)*10 + (2)*1
- 4*10 + 2
- 40 + 2
42
Reversed no =24
Similar questions