I need the program to remove a value from the number entered by the user until it reaches 0. I do not know if the replay loop used should be for, but my program looked like this.
package numerodescrecente;
import java.util.Scanner;
public class NumeroDescrecente {
public static void main(String[] args) {
Scanner leitor = new Scanner(System.in);
System.out.println("DIGITE UM NUMERO");
int n1 = leitor.nextInt();
for (n1=n1;n1>0;n1--)
{
System.out.println("Numero: "+n1);
}
}
}