Permalink
Browse files

FizzBuzz

  • Loading branch information...
1 parent dd9eff6 commit ceff5eb396e71bd621caf6fbdf79950f003e295d Younjin Kim committed Apr 10, 2012
Showing with 13 additions and 0 deletions.
  1. +13 −0 fizzbuzz.m
View
@@ -0,0 +1,13 @@
+function[]=fizzbuzz(n)
+for i=1:n
+ if mod(i,15)==0
+ disp('FizzBuzz')
+ elseif mod(i,3)==0
+ disp('Fizz')
+ elseif mod(i,5)==0
+ disp('Buzz')
+ else
+ disp(i)
+ end
+end
+end

0 comments on commit ceff5eb

Please sign in to comment.