Professional Documents
Culture Documents
Question 1:
Write program enter your salary amount in rupees prints the number of,
1000/=,500/=,200/=,100/=,50/=,20/=,10/=,5/=,2/=,1/= notes and coins needed.
E.g.: - Amount=2754
1000-Notes-2
500 Notes-1
100 Notes-2
50 Notes-1
20Notes-0
10 Notes-0
5Notes-0
2Notes-2
1Notes-0
Hint: -
1. Create interface as follow using Text box, Data Grid View and button.
2. Submit button click event.
Here you need to use integer type array and enter notes and coins available in Sri
Lanka.
After that using for loop and using Reminder operator (%) Or Modulo (%) you
can calculate the notes and coins included in your salary as follow.
3. Final output should be as follow.