Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Pages File Edit Insert Format Arrange View Share Window Help 79% Sun 7:45 PM Q CSC242 Week Two Midterm Exam D2L Week Two: Assign 125%
Pages File Edit Insert Format Arrange View Share Window Help 79% Sun 7:45 PM Q CSC242 Week Two Midterm Exam D2L Week Two: Assign 125% EE T Update Apple ID Settings C nationalu.br View Some account services will not be View Zoom Add Page Insert Table Chart Text Shape Media Comment available until you sign in again. Pages SECTION Week P1 (35 Points) - Compute the Perimeter of a Triangle Background Write a program that reads three edges for a triangle (edge1, edge2, edge3) and computes the Time Limit: perimeter (perimeter = edgel+edge2+edge3) if the input is valid. Otherwise, display that the input is invalid. The input is valid if the sum of every pair of two edges is greater than the remaining edge Headers & Footers (edge1+edge2>edge3 and edge1+edge3>edge2 and edge3+edge2>edge1). Hide on first page of section Page 1: Your C++ code for this HW Match previous section Copy and paste your code here 1 Page Numbering Run the code for the following two inputs and show the results: Format 1, 2, 3 Input 1: edge1 = 3, edge2 = 4, edge3 = 5 Numbering Input 2: edge1 = 3, edge2 = 9, edge3 = 5 . Continue from previous section The program run result Start at: 1 0 Copy and paste the result here (e.g. the screen shot of the result you get by running the code). Create a new section v P2 (30 Points) - Solve Linear Equations Sections allow you to start a new header and footer, page numbering, or page You can use Cramer's rule to solve the following 2*2 system of linear equation: background. 3 ax + by = e ed - bf af - ec 8 8 BUTE x = ox + dy = f ad - bc ad - bc Write a program that prompts the user to enter a, b, c, d, e, and f, and displays the result. If (ad - bc) is 0, report that "The equation has no solution." Here is a sample run. Enter a, b, c, d, e, f: 9.0 4.0 3.0 -5.0 -6.0 -21.0 x is -2.0 and y is 3.0 nationalu.brightspace.com/content/er 146 JUN ... 11 tv
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