Sabtu, 09 April 2011

penambahan,perkalian dan penbagian dalam bahasa java

class Tugascharles{
public static void main (String[] args) {
double aa=5;
double bb=10;
double cc=0.5,hasila,hasilb,hasilc;
hasila = aa + bb + cc;
hasilb = aa * bb;
hasilc = aa / bb;


System.out.println("aa + bb + cc = " + hasila);
System.out.println("aa * bb = " + hasilb);
System.out.print("aa / bb = " + hasilc);
}
}

Tidak ada komentar:

Posting Komentar