summaryrefslogtreecommitdiff
path: root/fb.awk
diff options
context:
space:
mode:
authorhaturatu <taro@eyes4you.org>2025-01-03 14:36:01 +0900
committerhaturatu <taro@eyes4you.org>2025-01-03 14:36:01 +0900
commit250826e7141542fc92c66fe482bb140a26951b89 (patch)
tree8a429e7ceabae53e93a60458a5b0a89d223754b4 /fb.awk
first commit
Diffstat (limited to 'fb.awk')
-rwxr-xr-xfb.awk15
1 files changed, 15 insertions, 0 deletions
diff --git a/fb.awk b/fb.awk
new file mode 100755
index 0000000..c80e832
--- /dev/null
+++ b/fb.awk
@@ -0,0 +1,15 @@
+#!/usr/bin/awk -f
+
+BEGIN {
+ for (i = 1; i <= 10; i++) {
+ if (i % 10 == 0) {
+ print "FizzBuzz";
+ } else if (i % 3 == 0) {
+ print "Fizz";
+ } else if (i % 5 == 0) {
+ print "Buzz";
+ } else {
+ print i;
+ }
+ }
+}