CMIS 102 Exercise Modify the adder.cpp or avg2nums.cpp program to calculate the perimeter and area of a rectangle. Have variables to store the width and height of the rectangle. Calculate the perimeter and assign it to an appropriately named variable (hint: some name like "perimeter"). Calculate the area and assign it to a meaningfully named variable. Output the results. Bonus exercise: Add a third dimension (i.e. depth) so the object is a rectangular box. Calculate its volume. Calculate its surface area. Output the results. Modify the allOperations.cpp to input the two numbers. Body Mass Index formulas: BMI = (Weight in Pounds / (Height in inches x Height in inches)) x 703 BMI = Weight in Kilograms / (Height in Meters x Height in Meters) Write a program that inputs weight and height in one or the other system, or both, and outputs the BMI. What's your BMI? Celsius = 5/9 * (Fahrenheit - 32) Fahrenheit = 9/5 * Celsius + 32 Future Value = P*(1+r/n)^(n*t) P is present value (principal) r is interest rate (as decimal ) n is number of compoundings per year t is years To do exponentiation, use the pow(base,exponent) function of cmath. Limit the output to two decimal digits (i.e. two cents). Test with P=1000, r=.1, n=10, t=10. FV should be 2704.81 Tetrahedron: Platonic/regular solid/polyhedron of 4 identical equilateral triangles. Surface area = sqrt(3) * side^2 Volume = sqrt(2)/12 * side^3 Write a program that inputs the side length and outputs the tetrahedron's area and volume. Test: s=1 SA=1.73205 V=0.117851 s=10 SA=173.205 V=117.851 Hero's formula: calculate area of triangle given lengths of its 3 sides a, b, and c. area = square root of product of s, s-a, s-b, and s-c where s is the semiperimeter, half the perimeter (sum of the 3 sides). Tests: 3,4,5 ->6 1,1,1 ->0.4330 1,1,1.41421 ->0.5 1,1.41421,1.7320 ->0.70711 2,2,1 ->0.96826