# an application in dot net to create and application which do this.............

Posted by 0194Ca071007 under ASP.NET on 3/27/2012 | Points: 10 | Views : 663 | Status : [Member] | Replies : 2
Create a simple form where a single textbox and a button ,textbox name is Rupees and it will take only integer value greater than 160 and it must not have decimal values .Button's text will be 'Withdrawal' and when we click the button it will checks the textbox value and giv the information that how many rupee notes of 100.50& 10 will be there in this value for example
value=230 ,Then,

100 Rupee notes=1
50 Rupee notes=2
10 Rupee notes=3

It is must thatthe result will hav all the notes ,,you can not use only one or two notes.You hav to use all the three notes of 100,50 and 10.

#### Responses

Posted by: Rajni.Shekhar on: 3/28/2012 [Member] Bronze | Points: 25
 0 You have to create a algo like: Step1: devide value/100 and get output value and rest value step1.1: if rest value is zero than minus 100 from orignal value and minus 1 from quotient step1.2: now simple 100 rs: minus 1 from quotient 50rs=1 10=5 step2: if rest value is not zero than check it divisible by 50 or not, if yes it is fully divisible by 50 than again 50 minus from rest value and 1 minus from quotient and so on: Example: if your value is 780 step 1: devide it by 100 780/100 quotient_100=7 restValue=80 now devide restValue/50 i.e. 80/50 quotient_50=1 restValue=30 now devide restValue/10 i.e. 30/10 quotient_10=3 rest value =0 so Rs are 100=7 (quotient_100), 50=1 (quotient_50), 10=3 (quotient_10) another ex: value=800 1) devide by 100 800/100 quotient_100=8 and restValue =0 so if restValue is zero than take restValue=100 and quotient_100=quotient_100-1 i.e. 7 now devide restValue/50 means 100/50 quotient_50 = 2 restValue=0 so again restValue=0 so same step take restValue=50 and quotient_50=quotient_50-1=1 devide restvalue/10 means 50/10 quotient=5 restvalue=0 now rs will be: 100=7 50=1 10=5 same as algo can be applied for any number in your application. Thanks, Rajni Shekhar0194Ca071007, if this helps please login to Mark As Answer. | Alert Moderator
Posted by: Rajni.Shekhar on: 3/28/2012 [Member] Bronze | Points: 25