Linux For Cynics One user's experiences with Linux

15May/130

Fizz Buzz in Vim

The "Fizz Buzz" problem is a beginner's programming exercise. It is stated as:

Write a program that prints the numbers from 1 to 100. But for multiples of three print "Fizz" instead of the number and for the multiples of five print "Buzz". For numbers which are multiples of both three and five print "FizzBuzz"

Fairly simple, you can even get vim to do it:
vim_fizz_buzz

Tagged as: , Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


No trackbacks yet.