Java

g(x,y) Şeklinde Fonksiyon Örneği

g(x,y)=x+y+2;

Yukarıdaki fonksiyonların yazımı

//g(x,y)=x+y+2;
static int f(int x){
return 2*x+4;
}
static int g(int x, int y){
return x+y+2;
}
public static void main(String[] args) {
// TODO code application logic here
System.out.println(g(2,4));

}
run:
8
BUILD SUCCESSFUL (total time: 0 seconds)