summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan <[email protected]>2022-11-30 21:54:47 -0800
committerEvan <[email protected]>2022-11-30 21:54:47 -0800
commitb0f2aab4f1e2936074dd6794841222ec780552a4 (patch)
treebfa5804ecc9975507b06a3aa3fa5f82ca1c0a455
parentfghjuytredf (diff)
downloadcst116-lab3-evanmihm-b0f2aab4f1e2936074dd6794841222ec780552a4.tar.xz
cst116-lab3-evanmihm-b0f2aab4f1e2936074dd6794841222ec780552a4.zip
names
-rw-r--r--BlankConsoleLab/BlankConsoleLab.vcxproj3
-rw-r--r--BlankConsoleLab/BlankConsoleLab.vcxproj.filters2
-rw-r--r--BlankConsoleLab/cst116-Lab3-EvanMihm.cpp (renamed from BlankConsoleLab/BlankConsoleLab.cpp)6
-rw-r--r--BlankConsoleLab/infile.txt59
4 files changed, 52 insertions, 18 deletions
diff --git a/BlankConsoleLab/BlankConsoleLab.vcxproj b/BlankConsoleLab/BlankConsoleLab.vcxproj
index d2e3ee2..ef3b17f 100644
--- a/BlankConsoleLab/BlankConsoleLab.vcxproj
+++ b/BlankConsoleLab/BlankConsoleLab.vcxproj
@@ -24,6 +24,7 @@
<ProjectGuid>{3cecade6-3e15-4852-bd24-65bfe5d3a3aa}</ProjectGuid>
<RootNamespace>BlankConsoleLab</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
+ <ProjectName>cst116-Lab3-EvanMihm</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
@@ -139,7 +140,7 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
- <ClCompile Include="BlankConsoleLab.cpp" />
+ <ClCompile Include="cst116-Lab3-EvanMihm.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
diff --git a/BlankConsoleLab/BlankConsoleLab.vcxproj.filters b/BlankConsoleLab/BlankConsoleLab.vcxproj.filters
index aca1dd9..accf1da 100644
--- a/BlankConsoleLab/BlankConsoleLab.vcxproj.filters
+++ b/BlankConsoleLab/BlankConsoleLab.vcxproj.filters
@@ -15,7 +15,7 @@
</Filter>
</ItemGroup>
<ItemGroup>
- <ClCompile Include="BlankConsoleLab.cpp">
+ <ClCompile Include="cst116-Lab3-EvanMihm.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/cst116-Lab3-EvanMihm.cpp
index e80c091..ab62c04 100644
--- a/BlankConsoleLab/BlankConsoleLab.cpp
+++ b/BlankConsoleLab/cst116-Lab3-EvanMihm.cpp
@@ -17,15 +17,13 @@ using std::ofstream;
const int MAX = 100;
+//readfile, what it reads in for the number position
int ReadData(ifstream& inFile, int pick[], int drop[], int psgr[], float dist[], float fare[], float toll[], int totalfare, int cpm);
void WriteOutputFile(ofstream& outFile, int pick[], int drop[], int psgr[], float dist[], float fare[], float toll[],
int counter);
void PrintTotalsAndSummary(ofstream& out, int totalRecords);
-//the first 'array' is the descripption of what needs to be done in total 6 equations/things to do
-//next text is 6 cols by x rows
-
int main()
{
int pick[MAX];
@@ -68,12 +66,10 @@ int main()
cout << "\n\n\t\t ** About to EXIT NOW! ** ";
}
-
totalfare = fare[MAX] + toll[MAX];
return 0;
// totalfare = fare + toll;
// cpm = fare / dist;
-
}
int ReadData(ifstream& inFile, int pick[], int drop[], int psgr[], float dist[], float fare[], float toll[], int totalfare, int cpm)
{
diff --git a/BlankConsoleLab/infile.txt b/BlankConsoleLab/infile.txt
index f9423ec..1c3dbbb 100644
--- a/BlankConsoleLab/infile.txt
+++ b/BlankConsoleLab/infile.txt
@@ -1,11 +1,48 @@
-129 7 3 1.3 7.5 0
-
-36 69 1 11.41 32 5.76
-
-7 41 1 4.6 15 5.76
-
-150 61 2 6.75 23 0
-
-112 17 1 3.84 15 0
-
-80 112 6 1.64 9.5 0 \ No newline at end of file
+129 7 3 1.3 7.5 0
+36 69 1 11.41 32 5.76
+7 41 1 4.6 15 5.76
+150 61 2 6.75 23 0
+112 17 1 3.84 15 0
+80 112 6 1.64 9.5 0
+256 183 1 16.08 44.5 0
+138 166 2 7.4 24.5 6.12
+142 50 5 1.7 8 0
+107 163 0 3.6 17 0
+132 3 2 19.1 52 6.12
+48 41 1 4.07 18 4.36
+132 226 1 14.3 39 0
+229 151 1 3.96 14.5 4.58
+238 166 1 0.76 4.5 0
+151 238 2 0.64 5 2.2
+138 82 4 3 12 0
+264 231 3 10.74 32.5 0
+170 114 5 2.01 9 0
+186 87 2 3.45 12 0
+209 256 1 3.79 17 0
+132 107 1 17.2 52 6.12
+232 112 1 3.1 11 0
+164 141 3 2.85 10.5 0
+129 7 3 1.3 7.5 0
+36 69 1 11.41 32 5.76
+7 41 1 4.6 15 5.76
+150 61 2 6.75 23 0
+112 17 1 3.84 15 0
+80 112 6 1.64 9.5 0
+256 183 1 16.08 44.5 0
+138 166 2 7.4 24.5 6.12
+142 50 5 1.7 8 0
+107 163 0 3.6 17 0
+132 3 2 19.1 52 6.12
+48 41 1 4.07 18 4.36
+132 226 1 14.3 39 0
+229 151 1 3.96 14.5 4.58
+238 166 1 0.76 4.5 0
+151 238 2 0.64 5 2.2
+138 82 4 3 12 0
+264 231 3 10.74 32.5 0
+170 114 5 2.01 9 0
+186 87 2 3.45 12 0
+209 256 1 3.79 17 0
+132 107 1 17.2 52 6.12
+232 112 1 3.1 11 0
+164 141 3 2.85 10.5 0