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(" ");
}
}
Tidak ada komentar:
Posting Komentar