Question: COP2271 MATLAB Module 03 Activities Activity A Given 3 sides of a triangle, determine if it is a right triangle! Program Inputs Enter side 1:

 COP2271 MATLAB Module 03 Activities Activity A Given 3 sides ofa triangle, determine if it is a right triangle! Program Inputs Enter

COP2271 MATLAB Module 03 Activities Activity A Given 3 sides of a triangle, determine if it is a right triangle! Program Inputs Enter side 1: Enter side 2: Enter side 3: The user will always enter a positive value for each side, no error checking needed. Program Outputs This triangle has a right angle! . This triangle doesn't have a right angle... Sample Output Test Case 1: Enter side 1: 5 Enter side 2: 12 Enter side 3: 13 This triangle has a right angle! Test Case 2: Enter side 1: 17 Enter side 2: 8 Enter side 3: 15 This triangle has a right angle! Test Case 3: Enter side 1: 10 Enter side 2: 9 Enter side 3: 6 This triangle doesn't have a right angle... Test Case 4: Enter side 1: 1 Enter side 2: sqrt(2) Enter side 3: 2 This triangle doesn't have a right angle... COP2271 MATLAB Module 03 Activities Activity B Your local utility company charges customers for water usage on a tiered system: Tier Charge Gallons 0 - 5999 $2.35 per 1000 gallons Gallons 6,000 - 20,000 $3.75 per 1000 gallons Gallons over 20,000 $6.00 per 1000 gallons No mater the total water usage, the first 5,999 gallons cost $2.35 per 1000 gallons. Any gallons from 6,000 to 20,000 then cost $3.75 per 1000 gallons. Finally, any water usage left will cost $6.00 per 1000 gallons. Program Inputs .Enter your water usage in gallons: - The user will always enter a positive value, no error checking needed. Program Outputs Money owed: $XX.XX - Replace XX. XX with the actual money owed rounded to 2 decimal places Sample Output Test Case 1: Enter your water usage in gallons: 1000 Money owed: $2.35 Test Case 2: Enter your water usage in gallons: 10000 Money owed: $29.10 Test Case 3: Enter your water usage in gallons: 40000 Money owed: $186.60 Test Case 4: Enter your water usage in gallons: 6001 Money owed: $14.11

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!