Program that finds the average of a series of numbers

Assignment Help Basic Computer Science
Reference no: EM131302411

1. Write a program that finds the average of a series of numbers entered by the user. As in the previous problem, the program will first ask the user how many numbers there are. Note: the average should always be a float, even if the user inputs are all ints.

2. Write a program that approximates the value of π by summing the terms of this series: 4/1 - 4/3 + 4/5 - 4/7 + 4/9 - 4/11 + . . . The program should prompt the user for n, the number of terms to sum, and then output the sum of the first n terms of this series. Have your program subtract the approximation from the value of math.pi to see how accurate it is.

Reference no: EM131302411

Questions Cloud

Is it possible for packet to delivered to wrong destination : Assuming no malfunction in any of the station or nodes of a network, Is it possible for a packet to be delivered to the wrong destination?
Construct six reasons for and six reasons against the topic : Construct at least six reasons for and six reasons against the topic. Rank the reasons in terms of strength and effectiveness. Explain why you identified each argument as either strong or weak in each category.
What is the rate of return on the fund : Consider a no-load mutual fund with 200 million in assets and 10 million shares at the start of the year and with 250 million in assets and 11 million shares at the end of the year. During the year investors have recieved income distributions of $2 p..
Gross profit and ending inventory : The Bradley Corporation produces a product with the following costs as of July 1, 2014: Material $ 4 per unit Labor 4 per unit Overhead 2 per unit Beginning inventory at these costs on July 1 was 4,250 units. What is the value of ending inventory?
Program that finds the average of a series of numbers : Write a program that finds the average of a series of numbers entered by the user. As in the previous problem, the program will first ask the user how many numbers there are. Note: the average should always be a float, even if the user inputs are ..
Percent-of-sales method : The Manning Company has financial statements as shown next, which are representative of the company’s historical average. The firm is expecting a 25 percent increase in sales next year, and management is concerned about the company’s need for externa..
Growth and financing : Growth and financing [LO4] Eli Lilly is very excited because sales for his nursery and plant company are expected to double from $570,000 to $1,140,000 next year. Eli notes that net assets (Assets − Liabilities) will remain at 50 percent of sales. Do..
Define a best fit pmlc model for this project : Define a best fit PMLC model for this project.- Establish requirements based on the information providedbelow.- Provide aWBS.
Calculate the volume and surface area of a sphere : Write a program to calculate the volume and surface area of a sphere from its radius, given as input. Here are some formulas

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Describe the concept of pipelining and why it is used

Design an edge detector circuit. The output should go HIGH for one cycle after the input makes a 0 → 1 transition.

  Would an analogous web record be of use in supporting http

would an analogous WEB record be of use in supporting HTTP?

  Calorie management

Option 1: Calorie Management Develop an algorithm in pseudocode that shows the tasks and subtasks for each program module component that was in the simple algorithm you developed in Week 2

  What multivariate procedures are suggest

In terms of your own research try to formulate a problem that appears suitable for multivariate analysis.

  Whats the difference between public, private and protected

What's the difference between public, private and protected?

  Capabilities of midrange systems

Some commentators have suggested that mainframe computer systems could be squeezed out of existence in the next few years, with the incredible advances in the capabilities of midrange systems and the power of supercomputers

  What are the primary tasks of a system administrator

what are the primary tasks of a system administrator? 2. What does each task accomplish

  Write regular definitions for the following languages

Write regular definitions for the following languages

  Dependence of bp it organization

The case mentions the dependence of BP's IT organization on external contractors. Why would this be an issue? When is it a good idea for IT departments to hire contractors, and when is it not? Discuss some scenarios.

  Use openoffice software to build tables

PART 1 You are required to use OpenOffice software to build tables, write, and execute queries.Step 1Build a Database named DBMS Course Project. The database should include following tables.

  Use the class date type to store the date of birth

Use the class date type to store the date of birth, admit date, discharge date, and class doctorType, to store attending physicians name. Add appropriate constructors and member functions to initialize, access and manipulate the data members.

  Determining the use of two arrays

Define two arrays x and f, each of size 10, using call-by-reference, to pass an array to a function, named sum. In main: define array, pass arrays, print out the array and the results on screen. In function sum, take arrays from main and sum the a..

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