Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started