java Program To Count Total Number Of Notes in Given Amount| amount input by user.

 



ALSO YOU CAN COPY :

public static void main(String[] args) {
int amount;

int [] notes={1000,500,100,50,20,10,5,1};
System.out.println("ENTER AMOUNT : ");
amount = s.nextInt();
for (int i=0;i<notes.length;i++){
System.out.println("Notes of "+notes[i]+" in ammount are : "+amount/notes[i]);
amount=amount%notes[i];

}
IF you face any problem on running this code please tell us in the comment section  we will help you..


THANKYOU FOR READING AND GET CONNECTED WITH US ! 

Comments