Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

/* * To change this template, choose Tools | Templates * and open the template in the editor.

*/ package dowhile2; import java.util.Scanner; /** * * @author */ public class Dowhile2 { /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here int n; Scanner in=new Scanner(System.in); System.out.println("<Cuenta regresiva desde un nmero dado>"); System.out.print("Introduce el inicio "); n=in.nextInt(); int i=n; do{System.out.println(i);i--;} while(i>=0); } }

You might also like