Need help writing a program that meets pseudocode and criteria . Txt File below
input.txt file data
05 11/30/16 03 12/07/16 05 12/07/16 05 12/08/16 01 12/10/16 07 12/11/16 07 12/14/16 06 12/15/16 02 12/21/16 05 12/21/16 06 12/22/16 07 12/22/16 08 12/23/16 07 12/23/16 07 12/23/16 07 12/23/16 08 12/24/16 08 12/24/16 07 12/24/16 03 12/26/16 05 12/26/16 07 12/28/16 04 12/29/16 07 01/01/17 06 01/03/17 07 01/03/17 08 01/05/17 05 01/10/17 04 01/17/17 08 01/17/17 07 01/18/17 07 01/18/17 08 01/18/17 08 01/18/17 08 01/18/17 07 01/18/17 04 01/18/17 05 01/18/17 06 01/19/17 10 01/20/17 08 01/21/17 10 01/21/17 09 01/21/17 09 01/21/17 10 01/21/17 07 01/21/17 07 01/21/17 06 02/21/17 09 02/22/17 09 02/22/17 09 02/22/17 07 02/25/17 09 02/26/17 08 02/28/17 07 03/03/17 10 03/03/17 10 03/04/17 09 03/05/17 07 03/10/17 09 03/15/17 09 03/20/17 10 03/22/17 07 03/30/17 09 03/30/17 09 03/31/17
Editable code:
#include <iostream>
#include <cstdlib>
#include <string>
#include <fstream>
using namespace std;
string earliestDate(const string arr[], int noOfElements)
{
return arr[0];
}
string latestDate(const string arr[], int noOfElements)
{
return arr[noOfElements - 1];
}
int main()
{
string r1[30], r2[30], r3[30], r4[30], r5[30];
int i1 = 0, i2 = 0, i3 = 0, i4 = 0, i5 = 0;
string line;
ifstream myfile ("input.txt");
if(myfile.eof())
{
cout << "The input file is empty";
}
else
{
cout << "\t\tTUSCAN GARDEN CUSTOMER RATING REPORT\n\n";
cout << "\tRating\t\t\tTotal\tEarliest Date\tLatest Date\n\n";
}
while (getline(myfile, line))
{
if(line.substr(0,2) == "01" || line.substr(0,2) == "02")
{
r1[i1] = line.substr(3,8);
i1++;
}
if(line.substr(0,2) == "03" || line.substr(0,2) == "04")
{
r2[i2] = line.substr(3,8);
i2++;
}
if(line.substr(0,2) == "05" || line.substr(0,2) == "06")
{
r3[i3] = line.substr(3,8);
i3++;
}
if(line.substr(0,2) == "07" || line.substr(0,2) == "08")
{
r4[i4] = line.substr(3,8);
i4++;
}
if(line.substr(0,2) == "09" || line.substr(0,2) == "10")
{
r5[i5] = line.substr(3,8);
i5++;
}
}
myfile.close();
cout << "1 - 2 (Unacceptable)\t\t" << i1 << "\t" << earliestDate(r1, i1) << "\t" << latestDate(r1, i1) << endl;
cout << "3 - 4 (Poor)\t\t\t" << i2 << "\t" << earliestDate(r2, i2) << "\t" << latestDate(r2, i2) << endl;
cout << "5 - 6 (Average)\t\t\t" << i3 << "\t" << earliestDate(r3, i3) << "\t" << latestDate(r3, i3) << endl;
cout << "7 - 8 (Above average)\t\t" << i4 << "\t" << earliestDate(r4, i4) << "\t" << latestDate(r4, i4) << endl;
cout << "9 - 10 (Very good)\t\t" << i5 << "\t" << earliestDate(r5, i5) << "\t" << latestDate(r5, i5) << endl;
system("pause");
}
Need help writing a program that meets pseudocode and criteria . Txt File below input.txt file...
The file containing the JAVA files, pseudocode file and doc file that have written for this lab. Preamble The file releasedates.txt contains a list of video games and their release dates. Each line of the file contains the release date, a tab character, and then the name. The list is currently totally unsorted. The object of today's lab is to write a series of methods that allow us to perform the following tasks: read contents from a file and store...
Need help with C++ assignment Assignment 1 and .txt files are provided at the bottom. PART A PART B Assignment 1 #include <iostream> #include <string> #include <fstream> #include <iomanip> #include <stdio.h> #include <ctype.h> #include <string.h> #include <algorithm> using namespace std; /** This structure is to store the date and it has three integer fields **/ struct Date{ int day; int month; int year; }; /** This structure is to store the size of the box and it...
What is the major product for each reaction? Could you please draw the mechanism? JAN FEB MAR APR MAY 01 02 03 04 05 06 07 08 09 10 11 12 13 JUN 14 15 16 JUL AUG SEP O 17 18 19 20 21 22 23 24 25
Random Sampling Written Homework 1. The table below lists students in an imaginary Statistics class, along with their identification numbers. Use your graphing calculator to select a random sample of 8s 01. Adrian 07, Gregg 08. Helern 13. Max 19. Stella Adrian07 Greg8 02. Betty 03. Carl 04. Diane 05. Earl ET11. Kar 14. Nicole 15. Oliver 16. Paxton 20. Trace 21. Una 22. Verle 12. Lucy 18. Rashid 17. Quentin 23. Wyatt 24. Xavier 06. Filene 2. The same...
Python help it is a grade 12 course def find astrological sign(month, date): (int, int)-str Given two int values represent ing a month and a date, return a 3-character string that gives us what star sign a person born in that month and on that date belongs to, Use the SIGNS string (already defined for you at the top of this file) to figure this out. NOTE FROM BOB: A lot of string slicing to do here. It looks like...
Describe the type(s) of relationship(s) between EMPLOYEE and JOB. MP-104 103 18 101 13 103 15 101 05 02 04 01 14 11 14 12 104 103 05 08 15 18 15 22 15 25 25 15 15 22 15 25 22 25 18 18 18 15 22 25 0 559 78 87 95-55 36 35 96 10 84 67 55 26 45 48 34 18 500 001 900 004 500 $10 03 04 05 06 07 08 09 10...
Choose and run the appropriate descriptive statistics (graphic and numerical) to describe the sample's age, sex, height, and year in college. What are the findings in the data from the outpout. Interpret the Data. Cipboaro Project View Output C1 C2 C3 C4 C5 Student ID Numer Age Sex Year in College Height 01 22 M 73 1 02 2 25 M 63 1 03 21 M 65 1 4 04 19 M 62 5 05 22 M 65 1 6...
What does this graph mean and how can I interpret it? Relative Value Value relative to August 28, 2019 with 0% reference level 2019-09-20 2019-10-14 2019-11-11 2019-11-13 2019-11-15 2019-11-19 Date 2019-08-28 2019-08-30 2019-09-04 2019-09-06 2019-09-10 2019-09-12 2019-09-16 2019-09-18 2019-09-24 2019-09-26 201909-30 2049-10-02 2019-300 2019-10-08 2019 2020 2019 10-16 2019-10-18 10-22 2019-10-24 2019-10-28 2019-10-30 2019-11-01 2019-11-6 2019-11-07 PG Nike Facebook Portfolio
How do i find the image height and width in SOF marker Segment( the Xthumbnail and Ythumbnail are all 0)? Which is the resolution of the image ff d8 ff e0 00 10 4a 46 49 46 00 01 01 01 00 c8 00 c8 00 00 ff db 00 43 00 02 02 02 02 02 01 02 02 02 02 02 02 02 03 03 06 04 03 03 03 03 07 05 05 04 06 08 07...
R$ ( pseudocode only, I just need the English written pseudocode) Write pseudocode for a program that prints a calendar such as the following: Su M T W Th F Sa 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31