Wednesday, 11 November 2015

contoh kasus if untuk bilangan positif & negatif

public class modul3_b {
    public static void main(String []args){
        int num=-4;
        System.out.println ("masukkan bil anda = " +num);
        if (num>=0)
        {
            System.out.println (num+"\tbil positif" );}
        if(num<=0)
        {
            System.out.println(num+"\tbil negatif");
        }
    }
      

No comments:

Post a Comment