Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

*************************************************************************** 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

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

Flash XML Applications Use AS2 And AS3 To Create Photo Galleries Menus And Databases

Authors: Joachim Schnier

1st Edition

0240809173, 978-0240809175

More Books

Students also viewed these Databases questions

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago