Question: please can anyone help me and explain this assignment for me. write program that contains two parts. this program should be written in C. Part

please can anyone help me and explain this assignment for me.

write program that contains two parts. this program should be written in C.

Part 1

Approximate PI to 10 places with the following formulas from using integer division and modulus operators

22/7

25/8

256/81

339/108

These are each stored in an array of size 10, each digit in a separate element. For instance, 3.1415926535 would be stored

3

1

4

1

5

9

2

6

5

4

void CalculatePi(int myPI[], int size, int numerator, int denominator);

Part 2

Print each array with a * below the location the value first differs from the above value of PI

For instance:

3.139123456 would print out

3

1

3

9

1

2

3

4

5

6

*

void PrintArray(int myPI[], int goodPI[], int size);

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!