Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Input file. 1,A,C,B,D,B,A,B,D,C,A 2,B,D,C,A,C,B,A,C,A,B 3,C,A,D,B,B,D,C,B,A,C 4,

ID: 3619082 • Letter: I

Question



Input file.


1,A,C,B,D,B,A,B,D,C,A
2,B,D,C,A,C,B,A,C,A,B
3,C,A,D,B,B,D,C,B,A,C
4,D,B,A,C,B,C,D,A,A,D
5,B,A,C,A,B,B,C,D,A,B
6,C,C,D,B,C,C,B,D,B,D
7,D,B,A,C,B,A,D,C,D,B
8,A,D,B,D,C,D,A,B,C,A
9,C,D,D,B,B,A,C,B,C,D
10,D,B,A,C,B,C,D,A,C,D
11,A,C,B,D,C,B,A,D,B,A
12,B,A,C,A,B,D,B,C,B,C
13,D,A,D,C,B,D,B,A,C,A
14,A,B,A,D,C,A,C,B,C,D
15,B,C,B,A,B,C,A,D,B,D
16,C,D,C,B,B,B,D,A,C,B
17,D,B,A,D,C,B,A,C,D,B
18,B,C,B,A,D,D,A,C,B,C
19,A,D,C,B,B,C,D,B,D,A
20,C,A,D,C,B,A,B,D,C,A




#include <iomanip>

#include <fstream>

#include <iostream>

#include <string>

#include <ctime>

voidshowAnswers();

using namespace std;

int main()

{

     

    char ch;

    string data;

    charinput[10][20];

    intj,k,count;

    //char response;

    char*fileName = new char[10];

    string in;

    ifstream infile;

    ofstream outfile;

    outfile.open("data.csv",ios::app);        //out file where data is going.

      outfile << fixed << showpoint;

    outfile << setprecision(2);

    chardateStr[9];

    _strdate_s(dateStr);

    printf("Thecurrent date is %s ", dateStr);

          cout << "Baker Data Group" << endl;

        cout << "Thisprogram turns data into percentages." << endl;

        cout << "Enter'Y' or 'y' to continue." <<endl;

        cout << endl;

        cin >> ch;

           //promptuser to enter input file name

    cout << " Enterthe input file name: ";

    cin >> fileName;

    //open input file

    infile.open(fileName);

    if(!infile.is_open())

    {

        cout << "unableto open the input file.";

        system("pause");

        exit(1);

    }

    for (int i=0; i < 20; i++)

    {  

            infile >> in;

        j = 0;

            {

         while(in[j]!=',')

                  j++;

           

         for(k=0;k<10;k++)

             while(in[j]<'A'||in[j]>'D')

           

                    j++;

              input[k][i]=in[j];

        &nbs

Explanation / Answer

please rate - thanks #include #include #include #include #include using namespace std; void showAnswers(); void answers(int,ifstream &); int main() {    char ch;     string data;     char input[10][50];     int j,k,count,num=0;     //char response;     char *fileName = new char[10];     string in;     ifstream infile;     ofstream outfile;    outfile.open("data.csv",ios::app);       //out file where data is going.       outfile