Starting from:

$29.99

CS150 ZOOM Solution

Lab 7: FizzBuzz
Write a program that prints the numbers from 1 to 100, one per line, but for multiples of three print “Fizz” instead of the number and for multiples of 5 print “Buzz” instead of the number. For numbers which are multiples of both three and five instead print
“FizzBuzz”.






Example Output:

1
2
Fizz
4
Buzz
Fizz
7
8
Fizz
Buzz
11
Fizz
13
14
FizzBuzz
16
17
...

More products