Coding Through the Alphabet - Fibonacci in AWK
AWK is a domain-specific language designed for text processing. It is available on all Unix-like systems.
How to test
Prerequisites: AWK (pre-installed on all Unix/Linux/macOS systems)
awk -f fibonacci.awk
Expected output:
0
1
1
2
3
5
8
13
21
34
Source Code
BEGIN {
a = 0
b = 1
for (i = 0; i < 10; i++) {
print a
c = a + b
a = b
b = c
}
}
Local Testing Screenshot
