We wish to process survey results

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

 

Suppose we wish to process survey results that are stored in a file. This exercise requires twoseparate programs. First, create a program that prompts the user for survey responses and outputseach response to a file. Use an ofstream to create a file called "numbers.txt". Then create a program to read the survey responses from "numbers.txt". The responses should be read from the

file by using an ifstream. Input one integer at a time from the file. The program should continueto read responses until it reaches the end of file. The results should be output to the text file "output.txt".

Contents of numbers.txt = 5 3 7 2 8 6 9 5 4 2 1 2 8 10 4 9 8 2 1 3 7 5 6 8 4 3 8 2 1

Contents of output.txt =

Number of 1 responses: 3

Number of 2 responses: 6

Number of 3 responses: 3

Number of 4 responses: 4

Number of 5 responses: 4

Number of 6 responses: 2

Number of 7 responses: 3

Number of 8 responses: 5

Number of 9 responses: 2

Number of 10 responses: 2

Full Rating to whoever can give me the comilable code in C++ so that it gives the output shown above.

 

 

Reference no: EM13162698

Questions Cloud

How does it differ from the implementation of the class? : what is the public interface of the counter class in section instance variables and encapsulation?
During the execution of the above code, how many instru : (a) During the execution of the above code, how many instructions are executed? (b) Assuming a standard unicycle machine (CPI = 1) running at 100 KHz, how long will the above code take to complete?
Create an application user to enter the following employee : Create an application that allows the user to enter the following employee data: First Name, Middle Name, Last Name, Employee Number, Department, Telephone Number, Telephone Extension, and E- mail Address. The valid selections for depart-ment are Acc..
Control that programmee with key : Please control that programmee with key (left ,right ,up and down ) and also make a chain of snake when eat egg,and game over when snake strike with hurdel.
We wish to process survey results : Suppose we wish to process survey results that are stored in a file. This exercise requires twoseparate programs. First, create a program that prompts the user for survey responses and outputseach response to a file
Given a 3 millisecond seek time : Given a 3 millisecond seek time for a disk drive and assuming that once you reach the starting track you will write the file as contiguous sectors, how long will it take to write a 1 megabyte file? The disk rotates at 7200 rpm and each sector hold 1 ..
User enters a negative number or a nondigit number : If the user enters a negative number or a nondigit number, throw and handle an appropriate exception and prompt the user to enter another nonnegative number.
Receiver r is conducting an auction : Assume the receiver R is conducting an auction in which two bidders each encrypt their bids using the scheme above and send them to R.
Hash function h is used and the signature : Suppose a hash function h is used and the signature must be valid for h(m) instead of m. Explain how  this scheme protects against existential forgery

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create a text adventure game that uses pointers

Create a text adventure game that uses pointers. You have a rich, eccentric Uncle Billy who is soon to be deceased.

  Implement a graphics system that has classes

Implement a graphics System that has classes for various figures: rectangles, squares, triangles and circles. A rectangle has data members height, width, color , and center point. A square has center point and an edge and color

  Main function to input twenty integers in given range

Write a main function to input 20 integers in range of 1-6, function should count number of times the numbers 2 and 5 occur. function must declare statics variables count2 and count5.

  Prepare a linear support vector machine svm

Write a computer program to prepare a Linear Support Vector Machine SVM

  Write c program to read one ip address

Write a C or C++ program which Read one IP address at a time from Dec_IPAddresses.txt and convert it into Hex. Store converted values stored in another file (e.g. HEX_IPAddresses.txt).

  Multidimensional arrays

multidimensional arrays to life, let's consider a specific example: How can you visualize a 4-dimensional array? How can you give meaning to each dimension this array has? What kind of application would such an array be useful for?

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write c++ program that reads in the average monthly rainfall

Write a C++ program that reads in the average monthly rainfall for a city for each month of the year and then reads in the actual monthly rainfall for each of the previous 12 months

  Pros and cons of choosing two servers

Classify the two alternatives in terms of what type of application architecture they use. b. Outline the pros and cons of the two alternatives and make a recommendation to Fred about which is better.

  Create a program for a company named retail-mart

Prompt the user to enter an item name (one word only), a quantity and a price. For this step, in addition to functionality, I'll be looking at: location of the variable declarations; appropriateness of data types selected; appropriateness of the va..

  Const int num_years

How do you get this program to get both player input and then display results(As described on bottom) #include  const int NUM_YEARS=15;//The number of years const int NAME_SIZE=32;//The max size of the player name string

  By a minimal interpretation that makes a formula

By a minimal interpretation that makes a formula true, we mean that if one atom is removed from the interpretation then the resulting interpretation does no longer make the formula true.

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