Bincy Roy
Answered On : Jul 30th, 2012
Code
#include<stdio.h>
int main(){
int amount,no_hun,no_fifty,no_ten,no_five,no_two,no_one,total_notes;
Enter the amount: ");
scanf("%d",&amount);
no_hun=amount/100;
amount=amount%100;
no_fifty=amount/50;
amount=amount%50;
no_ten=amount/10;
amount=amount%10;
no_five=amount/5;
amount=amount%5;
no_two=amount/2;
amount=amount%2;
no_one=amount/1;
amount=amount%1;
total_notes=no_hun + no_fifty + no_ten + no_five + no_two + no_one;
printf("Smallest No of notes = %d",total_notes
);
return 0;
}
Login to rate this answer.