Untuk mempercepat langsung saja Anda lihat inputan dan outputan di bawah :
Input :
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package dowhile10.pkg1;
/**
*
* @author dery
*/
public class DoWhile101 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
int i = 10;
do {
System.out.println(i);
i--;
} while (i >= 1);
}
}
Output :
Input :
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package dowhile10.pkg1;
/**
*
* @author dery
*/
public class DoWhile101 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
int i = 10;
do {
System.out.println(i);
i--;
} while (i >= 1);
}
}
Output :
Tidak ada komentar:
Posting Komentar