Question: *************************************************************************** Name: Student ID: Section: *************************************************************************** [5 MARKS] Write, compile, and run a C program to compute the square and square root of the numbers

*************************************************************************** Name: Student ID: Section: *************************************************************************** [5 MARKS]

Write, compile, and run a C program to compute the square and square root of the numbers from 49 to 85 in increments of 4.

Display the results as shown in the sample run below. Use a field width of 10 for each column. Specify the cube root to 2 decimal places.

Note: You may calculate the square of a number, x, as x * x. Note: The sqrt() function takes an argument of type double and return type is double. Note: Use of the sqrt() function requires inclusion of the math.h header file.

Refer to the sample run below:

NOTE: The Name, Student ID and Section that appears in the output of the program should be your own, not the ones used in the sample run.

--- Sample run 1: --------

*********************************************************************** Name: Smith, Peter Student ID: 300999999 Section: 002 ***********************************************************************

Iteration Square(x) Sq. Root(x)

49 2401 7.00 53 ... ... 57 ... ... 61 ... ... 65 ... ... 69 ... ... 73 ... ... 77 ... ... 81 ... ... 85 7225 9.22 Press any key to continue . . .

PROGRAM OUTPUT - Provide a table similar to the one above and paste it to your WORD document:

*/ #include #include

int main() {

system("pause"); return 0; }

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!