The program needs to enter the note value. When typing, the program should return number of notes of 20,10,5 1
/* Code in Java */
import java.util.Scanner;
class HelloWorld {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n;
int notas[] = {20, 10, 5, 1};
int numeroNotas[]={0,0,0,0};
int i;
System.out.println("Digite o numero:");
n = sc.nextInt();
while(n!=0){
System.out.println("Digite o numero:");
n = sc.nextInt();
}
for(i=0;i<=notas.length-1;i++){
System.out.println(" notas de "+notas[i]+" ="+numeroNotas[i]);
}
}
private static int conversor(int []notas,int n, int numeroNotas[]){
int i=0;
while(n%notas[i]==0){
i++;
}
numeroNotas[i]=numeroNotas[i]+1;
return i;
}
}