Lab 3 - Apr 11

  1. Write a program that takes the lengths of two sides of a right triangle and outputs the length of the hypotenuse. Remember that if a and b are the sides and c is the hypotenuse, then c2 = a2 + b2. Name the file lab3_1.cpp
  2. A simple way to round a number is to add 0.5 to the number and compute the floor. Write a program that loops asking the user to enter a double number and outputs the rounded value of that number. Use the sentinel value method to continue the loop. The sentinel value is 0. So when the user enters 0, the loop will end. Name the file lab3_2.cpp
Email all files to my Helios account.