Question
1. (a)Fizz Buzz Background: Fizz, Buzz is a famous code interview question in the software engineering community. It is so famous that it is probably
1. (a)Fizz Buzz
Background: Fizz, Buzz is a famous code interview question in the software engineering community. It is so famous that it is probably never used anymore in real interviews because everybody knows about it, but it was designed to quickly detect whether somebody knows the basics of programming. Objective: Write a program that prints out the numbers from 1 to 100. When the number you are printing is divisible by 3, print out Fizz instead of the number. When the number you are printing is divisible by 5, print out Buzz instead of the number. If the number is divisible by both 3 and 5 print out FizzBuzz as one word.
Sample Output: 1 2 Fizz 4 Buzz Fizz 7 8 Fizz Buzz 11 Fizz 13 14 FizzBuzz 16 ...
(b) Real Root solver
Write a program that asks the user to input three numbers a, b, and c. Compute the discriminant and then print out the number of solutions there are based on the result. Then, print out the solutions.
Sample Output: Enter the value of a: 2 Enter the value of b: 0 Enter the value of c: 4 There are no real solutions! Enter the value of a: 2 Enter the value of b: 0 Enter the value of c: 0 There is 1 real solution: -0.000000 Enter the value of a: 1 Enter the value of b: 5 Enter the value of c: 1 There are 2 real solutions: -0.208712, -4.791288
I Need this one for visual studios. C++ thank you.
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