From 8e9dfdbabe0f721e64fd39baa3a0f388c81b65ad Mon Sep 17 00:00:00 2001 From: nsfisis Date: Wed, 13 Aug 2025 02:06:59 +0900 Subject: feat: add 2 example files --- examples/fizzbuzz.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 examples/fizzbuzz.c (limited to 'examples/fizzbuzz.c') diff --git a/examples/fizzbuzz.c b/examples/fizzbuzz.c new file mode 100644 index 0000000..c24ce89 --- /dev/null +++ b/examples/fizzbuzz.c @@ -0,0 +1,14 @@ +int printf(const char*, ...); + +int main() { + for (int i = 1; i <= 100; i++) { + if (i % 15 == 0) + printf("FizzBuzz\n"); + else if (i % 3 == 0) + printf("Fizz\n"); + else if (i % 5 == 0) + printf("Buzz\n"); + else + printf("%d\n", i); + } +} -- cgit v1.2.3-70-g09d2