#include <stdio.h>

int g(int x);
void f(int x);


int main() {
    f(1);
    f(2);
    f(4); 
    
    return 1;
}


int g(int x) {
    if(x>2) {
        return x*x;
        
    } else {
        return 2*x;
    }
}

void f(int x) {
    int y; // def local variable
    
    y=g(x);
    printf("g(%d) = %d  %d\ng(%d) = %d  %d\n",x,y,x*y,x,y,x+y);
}


Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: