#include <stdio.h>
void printLine(); //함수 선언
void add();
void name();
int main() {
//내장 함수 : C언어에서 미리 만들어져 있는 함수
/* 사용자 정의 함수
void 함수이름(매개변수) {
실행할 코드;
} */
printLine(); //함수 호출
printLine();
add();
printLine();
name();
printLine();
return 0;
}
void printLine() { //함수 정의
printf("------------\n");
}
void add() {
int a = 11, b = 4;
printf("%d\n", a + b);
}
void name() {
char name[10];
scanf("%s", name);
printf("이름 : %s\n", name);
}
To embed this project on your website, copy the following code and paste it into your website's HTML: