#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int g(int x);
void f(int x);
int main() {
f(1);
f(2);
//exit(2);
f(4);
printf("Hello, World!\n"); // 화면에 문자열 출력 (표준 출력 함수)
int num = 8;
double root = sqrt(num); // 제곱근 계산 (표준 수학 함수)
printf("The square root of %3d is %.5f\n", num, root);
return 0;
return 100;
}
int g(int x){
if(x>2) {
return x*x;
}
else {
return(2*x);
}
}
void f(int x) {
printf("g(%d)=%d\n",x,g(x));
}
To embed this project on your website, copy the following code and paste it into your website's HTML: