/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package prosedurdanfungsi;
/**
*
* @author andi m
*/
public class ProsedurDanFungsi {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
jumlah(5,5,5);
System.out.println(jumlahFungsi(5,5,5));
}
//prosedur
public static void jumlah(int a,int b,int c){
System.out.println(a+b+c);
}
//fungsi
public static int jumlahFungsi(int a,int b,int c){
return a+b+c;
}
}
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package prosedurdanfungsi;
/**
*
* @author andi m
*/
public class ProsedurDanFungsi {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
jumlah(5,5,5);
System.out.println(jumlahFungsi(5,5,5));
}
//prosedur
public static void jumlah(int a,int b,int c){
System.out.println(a+b+c);
}
//fungsi
public static int jumlahFungsi(int a,int b,int c){
return a+b+c;
}
}
No comments