Wednesday, 11 November 2015

contoh kasus if else "pilihan umur"

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

/**
 *
 * @author asus
 */
public class modul3_c {
 public static void main(String []args){
    int umur = 19;
    if (umur <=25)
    {
        System.out.println ("usia saya = "+umur);
        System.out.println ("Anda masih Muda");
    }
    if (umur >25)
    {
        System.out.println ("usia saya = "+umur);
        System.out.println("Anda sudah Tua");
    }
}
}

No comments:

Post a Comment