Pangil_aku_Andi

Don't Give Up in Life …

Program Aritmatika


import java.util.Scanner;
public class aritmatika {
public static void main(String[]args){
System.out.println(“…….Created…….”);
System.out.println(”   Andi Mardianto   “);
System.out.println(“………………….”);
Scanner input = new Scanner(System.in);
int a; int b;
System.out.print(“Masukan Angka a: “);
a=input.nextInt();
System.out.print(“Masukan Angka b: “);
b=input.nextInt();
int c=(a+b);
int d=(a-b);
int e=(a*b);
int f=(a/b);
System.out.print(“\nPenjumlahan = “);
System.out.println(c);
System.out.print(“pengurangan = “);
System.out.println(d);
System.out.print(“Perkalian = “);
System.out.println(e);
System.out.print(“Pembagian = “);
System.out.println(f);
}
}
save as dengan “aritmatika .java”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: