Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Coded in C++ 1.Seed the random number generator with time. Prompt the user for the maximum and minimum values to determine the range of some

Coded in C++
image text in transcribed
1.Seed the random number generator with time. Prompt the user for the maximum and minimum values to determine the range of some random numbers. Then generate 3 random numbers in this range (between the maximum and minimum values inclusive). Print the numbers. Find and print the smallest of the numbers. Then determine and print the arithmetic average (with one decimal digit) of the largest two numbers. Test with a range of your choosing. 2. First write a flowchart and from it write a program to compute the real roots of a quadratic equation in the form ax2 bx +c. You may submit the flowchart on paper or you may upload a copy to canvas. Your program should prompt the user to enter the constants (a, b, and c) as floating point numbers. It is then to display the roots based on the following rules a. If both a and b are zero, print that there is no solution. b. If a is zero, there is only one root (-c/b). It should be c. If the discriminant (b2 - 4ac) is negative, print that d. For all other combinations there are two roots, which calculated and printed. there are no real roots should be calculated from the formulas below and printed with three decimal digits. b-62-4ac 2a 2a Find a way to do this program that uses if structures other than just simple if Test your program with the following data Set 1: a-3; b-8; c-5; Set 2: a- 6; b-7; c-8; Set 3: a-0; b-9; c--10; Set 4: a-0; b-0; c 11

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

What is management growth? What are its factors

Answered: 1 week ago

Question

LO4 Specify how to design a training program for adult learners.

Answered: 1 week ago