Jumat, 30 Desember 2011

tugas algoritma modul 3

MODUL 3
   NO.1 :
import java.util.Scanner;

public class Modul3

{
        public static void main(String args[])

{
        Scanner angka=new Scanner (System.in);

        int A, B;

        System.out.print("Bilangan 1 :");

        A=angka.nextInt();

        System.out.print("Bilangan 2 :");
        B=angka.nextInt();
        System.out.println("  ");

        System.out.println("Bilangan 1 = "+A);

        System.out.println("Bilangan 2 = "+B);
        System.out.println("  ");

        System.out.println("Hasil Operator Aritmatika");
System.out.println("=============================");
        System.out.println("A + B =  "+(A+B));
        System.out.println("A - B =  "+(A-B));
        System.out.println("A * B =  "+(A*B));
        System.out.println("A : B =  "+(A/B));
        System.out.println("A % B =  "+(A%B));
        System.out.println("  ");
}
}

0 komentar:

Posting Komentar

Statistik

Translate

Blog Archive