Challenge for Control Structures

Challenge

Here's a classic basic programming challenge. Write a program that prints the numbers from 1 to 50, 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”.

In C, use printf("text\n"); to print "text" with a newline and printf("%d\n", num); to print the number num with a newline. Make sure you print "FizzBuzz" together.

Please sign in or sign up to submit answers.

Alternatively, you can try out Learneroo before signing up.

Contact Us
Sign in or email us at [email protected]