Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Principles Of Database Systems With Internet And Java Applications

Authors: Greg Riccardi

1st Edition

020161247X, 978-0201612479

More Books

Students also viewed these Databases questions