Minggu, 18 April 2010

Java fungsi

class Fungsi{

public static int hasilKali(int a, int b, int c){

int hasil;
hasil = a * b * c;
return hasil;
}

public static void main(String[] args){

int a = 1;
int b = 2;
int c = 3;
int hasil;

hasil = hasilKali(a, b, c);
System.out.println("hasil kali perkalian : " + hasil);
}
}