Pages

Ads 468x60px

Sharing Ilmu Pengetahuan

Dasar Java Penjumlahan

public class Latih1
{

    public static void main (String [] args) {

  
    int a = 100;
    int b = 50;
    int c,d,e,f;
  
    c = a+b;
    d = a*b;
    e = a-b;
    f = a/b;

    System.out.println("Hasil Penjumlahan  ="+c );
    System.out.println("Hasil Perkalian       ="+d );
    System.out.println("Hasil Pengurangan ="+e );
    System.out.println("Hasil Pembagian    ="+f );

    }
  
}

No comments:

Post a Comment

Your comments are very valuable

 

Sample text

Sample Text

Sample Text