Question: Q1) Write A program that will iterate through numbers, from 1 to a number that was inputted from the user (using Scanner) and print as
Q1) Write A program that will iterate through numbers, from 1 to a number that was inputted from the user (using Scanner) and print as followed.
if the number is divisible on 3 print Fizz.
if the number is divisible on 5 print Buzz.
if the number is divisible on 3 and 5 print FizzBuzz
if neither print the number itself,
Note: Each result should be printed on a separate line
Q2) Get a number from the user (using Scanner) then print the factorial for that number, use while loop, don't use for
you can use google to know what is the factorial.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
