Monday 24 July 2017

DO-WHILE example

public class DoWhile {
public static void main(String[] args) {
    int i=1;
    do{
        System.out.println(i);
    i++;
    }while(i<=5);
}
}


OUTPUT:

1
2
3
4
5

No comments:

Post a Comment