Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
17
Task/FizzBuzz/MATLAB/fizzbuzz-2.m
Normal file
17
Task/FizzBuzz/MATLAB/fizzbuzz-2.m
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
function out = fizzbuzzS()
|
||||
nums = [3, 5];
|
||||
words = {'fizz', 'buzz'};
|
||||
for (n=1:100)
|
||||
tempstr = '';
|
||||
for (i = 1:2)
|
||||
if mod(n,nums(i))==0
|
||||
tempstr = [tempstr, words{i}];
|
||||
end
|
||||
end
|
||||
if length(tempstr) == 0
|
||||
disp(n);
|
||||
else
|
||||
disp(tempstr);
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue