Write a program that reads in from a file two month names

Assignment Help Computer Engineering
Reference no: EM132182802

I was wondering if I could get some help on the last program I need to complete for an engineering C++ class. It is a very simple program however there is one part of the problem stumping me. Here is the problem statement

Write a C++ program that reads in from a file two month names, followed by the rainfall amounts for each month in that span of months.

These rain amounts are totaled, and then an average for each month in the span of months is calculated. Because the program does not know how many months of rainfall data there is, it must read and process data values until the end of file is encountered. The data for this program can be found in the Rainfall.txt file, which is located in on Blackboard

Below is the file data. As you can see it is extremely simple however I cannot for the life of me figure out how to make the program distinguish between strings and numeric data to sort into respective arrays.

I have tried 2d arrays, Two 1D arrays, the peek function, getline functions and a multitude of other approaches.

Reference no: EM132182802

Questions Cloud

Implementing social and economic reforms : If populist leaders are implementing social and economic reforms across Latin America that benefit the masses, does it matter that they consolidate power?
Reflect which takes any string and returns the string : Write a function called reflect which takes any string and returns the string forward and backward.
Describe prototyping and provide your reasoning : Describe prototyping and provide your reasoning for whether or not you will be using it at this point in the project.
Discuss your experiences with bluetooth hacking : Discuss how they would envision the devices that they own working together and how that might be done in a secure manner.
Write a program that reads in from a file two month names : Write a C++ program that reads in from a file two month names, followed by the rainfall amounts for each month in that span of months.
Compression and analog to digital process : Without quantization is there any possibility of losing some amount of information in compression and analog to digital process?
Create and use a subroutine that takes single character : Create and use a subroutine that takes single character parameter and displays a count of the number of environment variables that start with the subroutine.
Compute the number of words-lines in the input file : Compute the number of words/lines in the input file and print the result to the output file. 4. Document the program using Python comments.
Why are wireless transmissions being lost in transit : For good measure, you also walk around the office space with your wireless analyzer to confirm that there are no significant dead zones or interference.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Give everyones last name in all uppercase

List the first name, last name, and birthday of everyone whose birthday is after July 4, 2005.

  Describe concerns with properly controlling the given flow

Describe concerns with properly controlling this flow, including keeping it safe from unauthorized use.

  How can the target company affect the application

How can the target company affect the application? Why is it desirable that the SD is a DAG instead of a tree?

  Demorgans theorem

Compute by means of the truth table the validity of DeMorgan’s theorem for three variables: (ABC)’ = A’ + B’ + C’. Simplify the following expressions using Boolean algebra. AB + A(CD + CD’)

  List and describe three possible project risks and how they

q1. what personal characteristic do you think is most important for a cio and why?q2. list and explain three possible

  Wap that reads an arbitrary number of even integers

Write a program that reads an arbitrary number of even integers that are in the range 2 to 100 inclusive and counts how many occurrences of each are entered.

  Calculate the mean access time to four decimal digits

Calculate the mean access time to 4 decimal digits. Assume pipelining. i.e., we begin memory accesses while initiating cache accesses.

  What was the precursor to the present-day internet

What was the precursor to the present-day Internet? List the main responsibilities of Internet Protocol. Explain relationship of port number to an IP address.

  Ways that virtualization is accomplished using software

Can you explain one or two ways that virtualization is accomplished using software and hardware

  Complete specification of a software design

List the four design models required for a complete specification of a software design and the role of each.

  What are the various devices that can interconnect to sonet

How does Frame Relay differ from X.25? What is SONET and SONET/SDH? What are the various devices that can interconnect to SONET?

  Plot the error probability as measured in the simulation

Perform a Monte Carlo simulation of a (Ny,NR) = (2, 2) MIMO system that employs the Alamouti code in a Rayleigh fading channel.

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