Write a python program to count the total number of notes in a given amount.??
Answers
Answered by
0
Answer:
int a[8]={500,100,50,20,10,5,2,1},m,temp,i;
printf("Enter the amount:");
scanf("%d",&m);
temp=m;
for(i=0;i<8;i++)
{
printf("\n%d notes is:%d",a[i],temp/a[i]);
temp=temp%a[i];
Explanation:
Answered by
1
Answer:
# Write a python program to count the total number of notes in a given amount.??
notes = [2000, 500, 200, 100, 50, 20, 10, 5, 2, 1]
amount = int(input("Enter the ammount: "))
for i in range(8):
print("Rs.", notes[i], "notes will be:", amount/notes[i])
amount = amount%notes[i]
Explanation:
hope it will help you
Attachments:
Similar questions