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

  Main way of looking at things here

A lot of people are worried about 'Big Brother' watching them and believe that Facebook is an area in which this is the main way of looking at things here.

  Learning team collaboration

Learning Team Collaboration: Compare Different Mobile and Wearable DevicesThe team should get together and discuss the different kinds of mobile and wearable devices (at least two, preferably three or more), research the features and functionality ..

  Write a program to implement the simulation

If there are two or more, schedule the retransmissions and try again.

  Write a plan for analysis and design of an e-commerce site

Write a plan for the analysis and design of an e-commerce site recommending which aspects of process and data analysis should be conducted and explaining how they should be integrated.

  Relationship between mutual information and copula''s entropy

To derive Eq. (10.50) on the relationship between mutual information and a copula's entropy, we used a direct approach. Following a procedure similar to that described for deriving Eq. (10.49), rederive Eq. (10.50).

  Driving force causing this evolution

Discuss the evolution of client-server computing from file server to multilayer applications to Web-based applications. What has been the driving force causing this evolution? Where do you think network computing will be in the next five years? Ten y..

  Draw logic diagram of circuit having flip-flop equations

A sequential circuit has two D flip-flops A and B, two inputs x and y, and one output z. The flip-flop equations and circuit. Draw the logic diagram of the circuit.

  What is the most challenging aspect

What is the most challenging aspect of using the economic analysis workbook?

  Design an application that gets customer account data

Design an application that gets customer account data that includes an account number, customer name, and balance due.

  What is polling and interrupts

what is polling and interrupts? Please provide definitions

  How you think fox lake should proceed

Using Figure 10-13 as a guide, develop a plan for implementing the process in Figure 10-9. Ignore the Collect Deposit activity. Assume that it has been developed and works.

  Role of it in the contemporary business organization

Understand the central role of IT in the contemporary business organization. Understand the impact of the World Wide Web on the management of business

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