I am not a good programmer or I might be devaluating myself too.
what would be the optimal solution to the case scenario of the 1-100 multiples of 3 fizz, multiples of 5 fizzbuzz?
I'm thinking of something like (pseudocode)
for i=1;i<=100;i++
if i % 3 == 0 && i % 5 == 0 print FizzBuzz
else if i % 3 == 0 print Fizz
else print i
1
26 May 2016 03:40
u/neofagger2
in v/programming
I am not a good programmer or I might be devaluating myself too.
what would be the optimal solution to the case scenario of the 1-100 multiples of 3 fizz, multiples of 5 fizzbuzz?
I'm thinking of something like (pseudocode)
for i=1;i<=100;i++
if i % 3 == 0 && i % 5 == 0 print FizzBuzz
else if i % 3 == 0 print Fizz
else print i