Write an algorithm and program to compute p

Assignment Help Computer Engineering
Reference no: EM132192808

Write an algorithm and program to compute p, using the formula described in the text pi=(4/1)-(4/3)+(4/5)-(4/7)+(4/9)...

Output will include your computed value for p, the math library constant expected value for p and the number of iterations it took to reach six-significant digit accuracy.

The number of iterations could exceed 250,000. Make your output clean and easy to read for comparing results. You may NOT use the math library constant in your computation - directly or indirectly. Use the delta of your running computation to determine when to stop.

Efficiency should always be considered. No rounding is required or allowed. Choose the most appropriate loop/decision structures and variable types.

Input: No user input.

Requirements: Use only material covered in the first six chapters. Style requirements as discussed in class expected.

Submission: Include program documentation that provides clear instructions for how to compile and execute your program. im completely lost on almost everything i dont know how to calculate pi without using th emath sonstant or how to get to six significant figures using loops without rounding. i also dont know what is meant by "include documentation for how to compile and execute program". In Java please.

Reference no: EM132192808

Questions Cloud

Write an application that allows a user shows watch demand : Write an application that allows a user to select one of at least five television shows to watch on demand.
Create chronological resume : Create a Chronological Resume going back 5 years of places you have worked, organizations you have participated in, and education.
What are the intended purposes of medical malpractice : What are the intended purposes of medical malpractice? Does the threat of a lawsuit accomplish these purposes?
What is the coase theorem : What is the Coase Theorem? What is a price ceiling? What is a price floor?
Write an algorithm and program to compute p : Efficiency should always be considered. No rounding is required or allowed. Choose the most appropriate loop/decision structures and variable types.
Will a risk averse investor always choose : Will a risk averse investor always choose a Treasury bond over a corporate bond (assume the maturities are the same)? Explain your answer.
Write an algorithm with programming code to move element : Write an algorithm with programming code to move last element to front in a given Singly Linked List.
Write an application that prints the content of al : Write an application that performs the following Creates an ArrayList, called al that can store integers.
Context-related information : Members have to communicate taskrelatedinformation, social-related information, and context-related information." Discuss thiscomment.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Discuss your feeling on how the given devices are being used

Research and discuss where RFID tags have been used for security measures. Discuss your feelings on how these devices are being used.

  Explain the purpose of the ethical hacking concept

Explain the purpose of the ethical hacking concept. Outline legal assessments on remote/foreign networks.3. Describe the role of an ethical hacker. Present what an ethical hacker can do legally at the state level.

  Decode the given sequence

A sequence is encoded using the LZW algorithm and the initial dictionary shown in Table 1.- The output of the LZW encoder is the following sequence:-  Decode the given sequence.

  Analyze the primary strategic business advantages

Analyze the primary strategic business advantages and disadvantages of wireless technologies in each industry. Analyze the primary technical advantages.

  Develop an incident-response policy which covers the growth

gem infosys a small software company has decided to better secure its computer systems after a malware attack shut down

  What is the value of pc before you execute the jal

Write a 2-3 sentence summary describing how the PC and $ra registers change when a subroutine is called and when we return from a subroutine.

  Write down a 700- to 1050-word paper by using the

choose one of the project development methodologies to guide your analysis of club it.write a 700- to 1050-word paper

  Create a listview that displays ten days of weather data

Connect to the free Web site: OpenWeatherMap org to retrieve weather data. Create a ListView that displays 10 days of weather data for that city.

  Discuss office administration and collaboration functions

Identify at least 2 SaaS providers that can provide services for basic office administration and collaboration functions like Web mail, messaging.

  Two-way set-associative cache for a main memory

Determining the Tag, Line, and Word values for the Direct-mapped, associative, and two-way set-associative cache for a main memory address of EEEEEE.

  How to create an online account

A database would store the student's login name, class list, and number of registered credits. Furthermore, the database will store the administrator's login information and the classes listed in the online catalog. Add error handling to the appli..

  How to identify vulnerabilities in an it infrastructure

How to Identify Threats & Vulnerabilities in an IT Infrastructure, Learning Objectives and Outcomes

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd