Program that opens the file reads all the numbers from file

Assignment Help Basic Computer Science
Reference no: EM131241726

Using Files-Numeric Processing

The Student CD contains a file named random.txt. This file contains a long list of random numbers. Copy the file to your hard drive and then write a program that opens the file, reads all the numbers from the file, and calculates the following:

A) The number of numbers in the file

B) The sum of all the numbers in the file (a running total)

C) The average of all the numbers in the file The program should display the number of numbers found in the file, the sum of the numbers, and the average of the numbers.

Reference no: EM131241726

Questions Cloud

What is the resistance of the parallel combination : a) What is the resistance of the parallel combination? b) What is the total current through the parallel combination? c) What is the current through the 40.4 Ω resistor?
Identify one or more communication competence you feel : Identify one or more communication competence you feel you have mastered. Identify at least one competency that you believe you need to improve. How do you think this improvement will enhance your personal and professional relationships?
Determine the mean amount steady smokers spend : A research firm conducted a survey to determine the mean amount steady smokers spend on cigarettes during the week. They found the distribution of amounts spent per week followed a normal distribution with a population standard deviation of $5. A sam..
Modify the student line up program described : Modify the Student Line Up program described in Programming Challenge 14 so that it gets the names from a data file. Names should be read in until there is no more data to read. Data to test your program can be found in the LineUp.dat file.
Program that opens the file reads all the numbers from file : The average of all the numbers in the file The program should display the number of numbers found in the file, the sum of the numbers, and the average of the numbers.
Write article about homelessness and poverty in community : Write an article about homelessness and poverty in your community, and how organizations (i.e. Salvation Army, Red Cross, churches, etc.) are helping. Write the article with the intention of publishing it in the community newspaper. How is your commu..
What was the initial speed of the lighter car : What was the initial speed of the lighter car (in km/h)? What was the initial direction (as measured counterclockwise from the x-axis)?
Draw the free-body diagram : We want to lower crate m1 down the ramp shown below with an acceleration of 1.25m/s².There is no friction on the ramp, but the level side has a coefficient of friction of 0.30. a. Draw the free-body diagram for each of the crates shown.
How the demand for accountants affects earning potential : Explain how the demand for accountants and CPAs affects earning potential in the accounting profession. What certifications interest you and how do they relate to your career goals?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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