(a) The length of a month varies from 28 to 31 days. In this task you are required to create a program that reads the name of a month from the user as a string. Then your program should display the number of days in that month. Display '28 or 29 days' for February so that lecap years are addressed.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
plz answer it in c++ 3a
QUESTION 3
3| Bachelor of Engineering
(a) The length of a month varies from 28 to 31 days. In this task you are required to
create a program that reads the name of a month from the user as a string. Then your
program should display the number of days in that month. Display '28 or 29 days' for
F'ebruary so that leap years are addressed.
(b) A triangle can be classified based on the lengths of its sides as equilateral.
isosceles or scalene. All 3 sides of an equilateral triangle have the same length. An
isosceles triangle has two sides that are the same lengths and a third side that is a
different length. If all of the sides have different lengths then the triangle is scalene.
Write a program that reads the lengths of 3 sides of triangles from the user. Display a
message indicating the type of the triangle.
f(r) = ar? - lr - e
(c) A univariate quadratic function has the form:
where a, b and e are constants, and a is non-zero. The roots of a quadratic function
can be found by finding the values of x that satisfy the quadratic equation
. A quadratic function may have 0, 1, or 2 real roots. These roots can be computed
using the quadratic formula, shown below:
ー6にVF- tur
root
The portion of the expression under the square root sign is called the discriminant. Ir
the discriminant is negative then the quadratic equation does not have any real
roots. If the discriminant is 0, then the equation has one real root. Otherwise the
equation has two real roots, and the expression must be evaiuated twice, once using
a plus sign and once using a minus sign, when computing the numerator.
Write a program that computes the real roo's of a quadratic function. Your program
should begin by prompting the user for the values of a, b and e. Then it should display
a message indicating the number of real roots, along with the values of the real
roots (if any).
Transcribed Image Text:QUESTION 3 3| Bachelor of Engineering (a) The length of a month varies from 28 to 31 days. In this task you are required to create a program that reads the name of a month from the user as a string. Then your program should display the number of days in that month. Display '28 or 29 days' for F'ebruary so that leap years are addressed. (b) A triangle can be classified based on the lengths of its sides as equilateral. isosceles or scalene. All 3 sides of an equilateral triangle have the same length. An isosceles triangle has two sides that are the same lengths and a third side that is a different length. If all of the sides have different lengths then the triangle is scalene. Write a program that reads the lengths of 3 sides of triangles from the user. Display a message indicating the type of the triangle. f(r) = ar? - lr - e (c) A univariate quadratic function has the form: where a, b and e are constants, and a is non-zero. The roots of a quadratic function can be found by finding the values of x that satisfy the quadratic equation . A quadratic function may have 0, 1, or 2 real roots. These roots can be computed using the quadratic formula, shown below: ー6にVF- tur root The portion of the expression under the square root sign is called the discriminant. Ir the discriminant is negative then the quadratic equation does not have any real roots. If the discriminant is 0, then the equation has one real root. Otherwise the equation has two real roots, and the expression must be evaiuated twice, once using a plus sign and once using a minus sign, when computing the numerator. Write a program that computes the real roo's of a quadratic function. Your program should begin by prompting the user for the values of a, b and e. Then it should display a message indicating the number of real roots, along with the values of the real roots (if any).
Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY