Wap to accept no of coin of 1 rupees and convert to notes of 100,5,20,10,and remaining coin
Answers
Answered by
1
u havent mentioned the language so I am just showing the basic algorithm
accept no of coins = coins
int hundNotes=coins%100;
coins= coins/100;
int twentyNotes=coins%20;
coins=coins/20;
int tenNotes=coins%10;
coins=coins/10;
int fiveNotes= coins%5;
coins=coins/5;
int left1rupeesCoins=coins
print all. values
hope it helps!!!
accept no of coins = coins
int hundNotes=coins%100;
coins= coins/100;
int twentyNotes=coins%20;
coins=coins/20;
int tenNotes=coins%10;
coins=coins/10;
int fiveNotes= coins%5;
coins=coins/5;
int left1rupeesCoins=coins
print all. values
hope it helps!!!
Similar questions