diff --git a/c-basic/main.c b/c-basic/main.c index fcdb9aa..a6606cc 100644 --- a/c-basic/main.c +++ b/c-basic/main.c @@ -1,10 +1,11 @@ -#include "foo.h" +#include "myprint.h" int main() { - foo(); + myprint(); return 0; } + diff --git a/c-basic/myprint.c b/c-basic/myprint.c new file mode 100644 index 0000000..5945aa2 --- /dev/null +++ b/c-basic/myprint.c @@ -0,0 +1,13 @@ +#include +#include "myprint.h" + +int myprint() { + + int a = 10, b = 20; + + printf("a = %d, b = %d\n", a, b); + printf("a = %d, b = %d\n", b, a); + printf("%d%d\n", a, b); + + return 0; +} diff --git a/c-basic/myprint.h b/c-basic/myprint.h new file mode 100644 index 0000000..9fcc774 --- /dev/null +++ b/c-basic/myprint.h @@ -0,0 +1,6 @@ +#ifndef MYPRINT_H +#define MYPRINT_H + +int myprint(); + +#endif