Question 4 Suppose we wish to process survey results that are stored in a file. This exercise requires two separate prog

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Question 4 Suppose we wish to process survey results that are stored in a file. This exercise requires two separate prog

Post by answerhappygod »

Question 4 Suppose We Wish To Process Survey Results That Are Stored In A File This Exercise Requires Two Separate Prog 1
Question 4 Suppose We Wish To Process Survey Results That Are Stored In A File This Exercise Requires Two Separate Prog 1 (103.13 KiB) Viewed 14 times
Can I get a quick answer please. It's c++
Question 4 Suppose we wish to process survey results that are stored in a file. This exercise requires two separate programs. First, create a program that prompts the user for survey responses and outputs each 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 continue to read responses until it reaches the end of file. The results should be output to the text file "output.txt". Hint: ■ The second program will use both ifstream and ofstream objects, the first for reading responses from numbers.txt and the second for writing frequency counts to output.txt. 16 Contents of numbers.txt 53728695421 2 8 10 4 5 2 7 10 49 8213756843821 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
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply