Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intranet And Web Databases For Dummies

Authors: Paul Litwin

1st Edition

0764502212, 9780764502217

More Books

Students also viewed these Databases questions

Question

How many Tables Will Base HCMSs typically have? Why?

Answered: 1 week ago

Question

What is the process of normalization?

Answered: 1 week ago