Pengikut

Nita Indah Purwanti. Diberdayakan oleh Blogger.
Selasa, 02 Agustus 2011

percobaan 13 "Operator"

public class operator
{

    public int a,b;

    boolean c,d,e;

    double f,g;

   


    public void testOperator()

    {


        a=19;

        b=2;

        c=true;

        d=false;

        e=!c;

        g=0.2;



        if (a%2==1)

            b=a++;

        else

            b=++a;

       
        f=(c&&!d||e)? a/g : a/(g+1);



        system.out.printIn("a : "+a);

        system.out.printIn("b : "+b);

        system.out.printIn("e : "+e);

        system.out.printIn("f : "+f);//*/

    }

    public static void main(string args[])

    {


        Operator oper= new Operator();

        oper.testOperator();

    }



    public int checkMonth(int Month, int year)

    {

        int day=0;

        if (month<8) {

            if(month%2==1)

                day=31;

            else if(month==2)

                day = (year%4==0)? 29:28;

            else

                day=30;

        }else{

            if(month%2==1)

                day=30;

            else

                day=31;

        }

        return day;

    }

}

0 komentar:

About Me

Foto Saya
Beautiful java of nita
My name NITA INDAH My School SMKN 4 BANDUNG
Lihat profil lengkapku