Write a program to read data from input file

Assignment Help C/C++ Programming
Reference no: EM13859005

Intro to C++ program. I've written it but it doesn't seem to work.

Write a program to read data from input file.  The first value read is the number of numbers to be read next.  Calculate average of those numbers and write to an output file the numbers read and the average.  Repeat this process until end of file. Use eof member function,

Sample of input file: 

NAME YOUR FILE   " lab4input.dat"  for input file

                                 "lab4output.dat" for output file

 

4   12 14   99   83  5  2  9  56   4   3   2   13   15   1   6   8    32   12    3   4   5   12   34   45 

 

 

Reference no: EM13859005

Questions Cloud

Would it lower the actual cost to the economy of military : Reinstituting a draft of military personnel would lower the military's budget. Would it lower the actual cost to the economy of the military? Is the production of other goods and services forgone by people joining the military? Does a draft change th..
Value of a share of common stock in that company : It should be written in form of report writing and according to the question in details with introduction conclusion references
Added benefit of pollution abatement projects : It is often claimed that an added benefit of pollution abatement projects sponsored by the government is the increase in employment generated by these projects. Evaluate this by answering the following. Where do governments obtain the funds to undert..
Opportunity cost to providing this support from government : The radio manufacturing industry has been in decline for quite some time. Suppose the government is called on to save this industry with infusions of cash, low interest loans, or other special breaks. This might be touted as helping firms remain open..
Write a program to read data from input file : Write a program to read data from input file.  The first value read is the number of numbers to be read next.  Calculate average of those numbers and write to an output file the numbers read and the average.  Repeat this process until end of file. Us..
Legalization of marijuana : Can you write o the arguement about the legalization of Marijuana supporting as well as opposing
Ice storms are net benefit to the economy : Consider the following statement. "Winter ice storms that sometimes hit Chicago are good for the economy. They create many jobs to remove downed limbs and replace trees and bushes." Do you agree that ice storms are a net benefit to the economy? To an..
Effective rate of protection-imposes a tariff will observe : Suppose the "Effective Rate of Protection" for Brazilian automobile producers is calculated to be - 60% (negative 60 percent). This result indicates that. A small country that imposes a tariff will observe: In the figure above, a large importing coun..
The program should display an error message : Implement a C++ program that open the file product_price.txt in input mode and another filehighest_lowest_prices.txt in output mode. If the files cannot be opened, the program should display an error message and quit program. The program should extra..

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Determine the meaof the numbers in the array

Determine the mean(average) of the numbers in the array, and output the reslt. Use a subprogram to input the numbers, a function to find the mean.

  Write a program to simulate the process

Write a program to simulate the process of an n-bit (n x n) shift-and-add syn-chronous multiplier - Compare performance of an unsigned shift-and-add multiplier with one using a shift-over technique.

  Write a program to convert string in reverse case

Write a program that asks the user for a string and display that same string in reverse order on the screen. The function should take a string parameter with the users input and return the same string, except each character is in reverse order

  Write function that calculates the pay amount

Write a second function that calculates the pay amount. If the salesperson owes money, the return amount from the function is a negative number.

  Clears the screen

Assignment: Write a script that meets the following requirements:•Clears the screen•Creates the menu displayed below with any additional formatting you may desire•Prompts the user to choose a menu option•Assigns the value chosen by the user to the va..

  Design and implement a dynamic doubly linked list

Design and implement a dynamic doubly linked list - Allocate and de-allocate memory at runtime - Analyze a basic set of requirements for a problem

  Write a loop that will step through the array

Write a loop that will step through the array you defined in question 1, displaying the contents of each element that doesn't contain a NULL pointer

  Difference between an object and a class

difference between an object and a class

  Each person in your team will complete one sequence

each person in your team will complete one sequence problem problem 1 or 2. one selection problem problems 3 4 or

  Compose basic c++ language programs

Analyze a basic set of requirements for a problem - Compose basic C++ language programs

  Create the movement of the car from the left to the right

Add the 2 wheels to the vehicle using the GlutWireSphere and create the movement of the car from the left o the screen to the right.

  Change temperature fahrenheit to celsius and kelvin

Write a program in c++ that takes the temperature in Fahrenheit and convert it to Celsius And Kelvin:

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