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

  Programs written with inheritance

Many programs written with inheritance could be written with composition instead, and vice versa. Rewrite the classes Point3D, Sphere and Cylinder using composition rather than inheritance

  The use of decision logic

The use of decision logic is one of the major concepts of computer programming.

  Write a matrix multiplication program

Write a C++, matrix multiplication program which you can instrument to monitor and measure execution time as a function of problem size. Make sure it works in Microsoft Visual Studio.

  Ruby implement primitive types

How does Ruby implement primitive types, such as those for integer and floating-point data?  3-What is the single most important practical difference between Smalltalk and C++?

  Make a game in which you guess a number

Make a game in which you guess a number between two set numbers to find the answer, the game should tell you if you are too low in your guess or too high. For example

  Implement the guess the word

Implement  the ‘Guess the Word' game in an object-oriented manner

  Base process which communicate with child processes

Write a program which has a "base process" which communicates with child processes acting as "bombers" that it creates.

  Write c program to add two integers and prints out average

Write a C program that prompts for a variable number of integers, adds them up, and prints out the average. The user will enter either an integer to be averaged.

  Write short c program to develops two processes

Write down a short C program which develops two processes. Each process must repeatedly write its own unique message to test file, one character at time. Do you see garbled messages in the file? Explain why or why not?

  Computer programming techniques

Construct a program from a design and use appropriate functions

  Create a file, shared.txt

When your program starts, it shall do the following:1. Create a file, SHARED.txt, in the current directory (cwd). 2. Write it's pid (Process ID) followed by a Carriage Return and Newline in the file.

  Write function to accept character array

Write down the C++ function which will accept the character array of at most 30 cells. Your function must return true if string and its reverse are identical;

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