Write a Java program using class that prints the numbers 1 to 50. For all multiples of 3 print “Fizz” and for all multiples of 5 print “Bizz”. For multiples of both 3 and 5 print “Fizz-Bizz”.
In this program, we iterate the loop and print Fizz when the current number is multiple of 3, and print Bizz when the current number is multiple of 5, and print Fizz-Bizz when the current number is multiple of 3 and 5. The below example… Read More »Write a Java program using class that prints the numbers 1 to 50. For all multiples of 3 print “Fizz” and for all multiples of 5 print “Bizz”. For multiples of both 3 and 5 print “Fizz-Bizz”.