Answers for "given is an integer, which represents the amount as an input from the user, display the minimum number of notes $ (500, 100, 50, 20, 10, 5, 2, 1) required for the amount. in c++"

C#
0

count the number of notes in a given amount c#

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];
Posted by: Guest on May-13-2020

Code answers related to "given is an integer, which represents the amount as an input from the user, display the minimum number of notes $ (500, 100, 50, 20, 10, 5, 2, 1) required for the amount. in c++"

C# Answers by Framework

Browse Popular Code Answers by Language