aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-08-13 02:06:59 +0900
committernsfisis <nsfisis@gmail.com>2025-08-15 10:06:21 +0900
commit8e9dfdbabe0f721e64fd39baa3a0f388c81b65ad (patch)
tree6c724cfbeaea94478b542560fa3b40e9f7467330 /examples
parent80e1d0fc957a2f254ca94232cca0269567888ddb (diff)
downloadducc-8e9dfdbabe0f721e64fd39baa3a0f388c81b65ad.tar.gz
ducc-8e9dfdbabe0f721e64fd39baa3a0f388c81b65ad.tar.zst
ducc-8e9dfdbabe0f721e64fd39baa3a0f388c81b65ad.zip
feat: add 2 example files
Diffstat (limited to 'examples')
-rw-r--r--examples/fizzbuzz.c14
-rw-r--r--examples/hello.c5
2 files changed, 19 insertions, 0 deletions
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);
+ }
+}
diff --git a/examples/hello.c b/examples/hello.c
new file mode 100644
index 0000000..5dce624
--- /dev/null
+++ b/examples/hello.c
@@ -0,0 +1,5 @@
+int printf(const char*, ...);
+
+int main() {
+ printf("Hello, World!\n");
+}