From e4a00e19f3730d9f01bf65b81c503e52da019ac6 Mon Sep 17 00:00:00 2001 From: wkddnjs3268 <wkddnjs5414@gmail.com> Date: Wed, 5 Aug 2020 16:03:52 +0900 Subject: [PATCH] 0805 --- three_files/func.c | 11 +++++++++++ three_files/func.h | 3 +++ three_files/main.c | 20 ++++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 three_files/func.c create mode 100644 three_files/func.h create mode 100644 three_files/main.c diff --git a/three_files/func.c b/three_files/func.c new file mode 100644 index 0000000..8f2a8a6 --- /dev/null +++ b/three_files/func.c @@ -0,0 +1,11 @@ +#include "func.h" + +int func1(int a) +{ + return (a * 10); +} + +int func2(int a) +{ + return (a * 2); +} \ No newline at end of file diff --git a/three_files/func.h b/three_files/func.h new file mode 100644 index 0000000..0aa7479 --- /dev/null +++ b/three_files/func.h @@ -0,0 +1,3 @@ +#pragma once +#define DF(a) ((a)*(a)) +extern int func1(int x); \ No newline at end of file diff --git a/three_files/main.c b/three_files/main.c new file mode 100644 index 0000000..97c7c73 --- /dev/null +++ b/three_files/main.c @@ -0,0 +1,20 @@ +#include <stdio.h> +#include "func.h" + +#define PRINT_ID + +int func_name_or_id() +{ +#ifdef PRINT_ID + printf("201920756"); + return 0; +#else + printf("�����"); + return 1; +#endif +} + +int main() +{ + func_name_or_id(); +} \ No newline at end of file -- GitLab