Question: Write a program that prompts the user to enter four integers and reads the four values with separate scanf statements. Write statements to find the

Write a program that prompts the user to enter four integers and reads the four values with separate scanf statements. Write statements to find the squareroot and cube of each value. Print the values and their squareroot and their cubes in a labeled table aligned as in the example shown below. Use five lines of output statements. You must use library function to calculate the square and the cube.

Squareroot should be printed out to 4 decimal places as shown below.

Note: The original numbers are being read in as ints..but squareroot and cube both output doubles. Keep this in mind.

Number Squareroot Cube

2 .1415 8

4 2.0000 64

6 2.6000 216

8 2.8900 512

2. Write a program that prompts a user to enter 3 angles(in degrees) between 0 and 180 degrees. Then print out a table that includes the angle(in degrees), its cosine, and its tangent. Use the same table format as displayed in 2 above. You must use library functions to calculate the cos and tan. You must define a constant called PI and use that to convert your angles to radians. Output the trig function values to 4 decimal places.

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!