Question: #include #include using namespace std; int main(int argc, char const *argv[]) { string a[] = {Pineapples, Show strings, Drill bits, USB drivers, Toothpaste}; int count[5]

 #include #include using namespace std; int main(int argc, char const *argv[])

#include  #include  using namespace std; int main(int argc, char const *argv[]) { string a[] = {"Pineapples", "Show strings", "Drill bits", "USB drivers", "Toothpaste"}; int count[5] = {0}; while (true) { int c; cout > c; if (c == 6) break; count[c - 1] += 1; } fstream newfile; newfile.open("out.txt", ios::out); if (newfile.is_open()) { for (int i = 0; i   B.) Using the function printThings, print out (cout) the file from your myOstream updates in part A. Print the results as item, and count. Make sure you show all of the the items. C.) Download the file on Brightspace called readIt.txt. It should be located where you found this document. This file contains numbers. Here is what is in this file: 456 776 99 3 765 433 211 994 609 65 4 Write the function readNumbers that reads this file until the end, adds each amount to a total, counts up all of the records, and when complete displays "The total numbers: XXX" on one line and "The number of records: xxx" on another line. We coded the part to close the file for you.  B.) Using the function printThings, print out (cout) the file from your myOstream updates in part A. Print the results as item, and count. Make sure you show all of the the items. C.) Download the file on Brightspace called readIt.txt. It should be located where you found this document. This file contains numbers. Here is what is in this file: 456 776 99 3 765 433 211 994 609 65 4 Write the function readNumbers that reads this file until the end, adds each amount to a total, counts up all of the records, and when complete displays "The total numbers: XXX" on one line and "The number of records: xxx" on another line. We coded the part to close the file for you

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!