a maths problem

boyzin

Novice
hello friends

i just want ne1 to solve this problem

in how many ways can you make change for Rs. 100 if you have notes of Re. 1, Rs. 2, 5, 10, 20, 50 and Rs.100?

HINTS:
1. Rs. 100 note is a change for Rs. 100
2. You can make change for RS. 50 using the same notes in 293 ways...

this is a fantastic problem
u can take help from anywhere... any computer software... etc.

i want the answer with solution.
 
I will write the pseudo code here...dont have any compiler. Maybe someone can write a proper program and get the answer

count = 0
for i = 0 to 100
for j = 0 to 50
for k = 0 to 20
for l = 0 to 10
for m = 0 to 5
for n = 0 to 2
if*i+2*j+5*k+10*l+20*m+50*n == 100)
count++
fi
endfor
endfor
endfor
endfor
endfor
endfor

Thats just a brute force way of doing it. Sure there are more elegant ways.

Raghu.
 
Back
Top