FizzBuzz/AWK: Difference between revisions

m
Line 117:
 
==Custom FizzBuzz==
Example program generated from "General FizzBuzz‎"[[General_FizzBuzz#AWK]],
for factors 2, 3, 5 using the words A, B, C. <br>
The list of numbers is also generated (much like in version 2 and 3),
and comes in as the file numbers.txt.
<!-- http://ideone.com/yw1oEK -->
<lang AWK># usage: awk -f fizzbuzzCustom.awk numbers.txt
Line 130 ⟶ 132:
x=="" {print $0; next}
{print "\t" x; x=""}
 
END {print "# Done."} </lang>
 
Anonymous user