ENGR 6 HOMEWORK 8-31-2017



ENGR 6 HOMEWORK 8-31-2017


1. Write a program to convert meters to miles.


(First, show the function of this program, then import from library. Create function main without using "void", since I wanted to input numbers. Then use function "printf" to create a dialog to ask user for input number. In this case, it will be the meters. Then save the input value as "input". Next, use printf again but this time multiply the input value by 0.000621371 since that's the ratio for converting to miles.)

 2. Write a program to convert degrees Celsius to degrees Rankin.


(Similar to previous one, but this time I changed the calculation.)

3. Write a program to compute the area of an ellipse with semiaxes a and b.

( This one is a bit complicate since there's two inputs. However, I named them with a and b. Then, set area equal to pi times a and b. Then print area for user to see.)


4. Write a program to compute the area of a sector of a circle when d is the angle in degrees between the radii.

( Similar to the first and second one, just change the calculation values. 

Comments