Seperti Ini program yang akan kalian buat,
Selamat mencoba semoga bisa bermanfaat (^_^).
public class aritmatikaDemo
{
public static void main(Sting[] args)
{
//sedikit angka
int i = 37;
int j = 42;
double x =27.475;
double y = 7.22;
System.out.println("Variable values...");
System.out.println("i="+i);
System.out.println("j="+j);
System.out.println("x="+x);
System.out.println("y="+y);
//penjumlahan angka
System.out.println("Adding...");
System.out.println("i+j="+(i+j));
System.out.println("x+y="+(x+y));
//pengurangan angka
System.out.println("Subtracting...");
System.out.println("i-j="+(i-j));
System.out.println("x-y="+(x-y));
System.out.println("i+j="+(i+j));
System.out.println("x-y="+(x-y));
}
}
- Judul : Memebuat AritmatikaDemo Menggunakan JCreator
- Penulis : Rizaldy Eka Jaya
- Kategori : Materi
-
Rating : 100% based on 10 ratings. 5 user reviews.
Item Reviewed: Memebuat AritmatikaDemo Menggunakan JCreator
9 out of 10 based on 10 ratings. 9 user reviews.