Selasa, 11 Maret 2014

Contoh source code sederhana JAVA

public class PerhitunganXY {
    public static void main (String args[]) {
        float x = 23.5f, y = 7.3F;
        System.out.println ("x = " + x);
        System.out.println ("y = " + y);
        System.out.println ("x+y = " +(x+y));
        System.out.println ("x-y = " +(x-y));
        System.out.println ("x*y = " +(x*y));
        System.out.println ("x/y = " +(x/y));
        System.out.println ("x%y = " +(x%y));
    }

}

Tidak ada komentar:

Posting Komentar