Driver code
var totalRupees = 1800 ; var X = 1 , Y = 2 , Z = 4 ; var Rupees = coin ( totalRupees , X , Y , Z ) ; document . write ( " " + Rupees * 1 + " " ) ; document . write ( " " + Rupees * 2 + " " ) ; document . write ( " " + Rupees * 4 + " " ) ;