diff options
| author | [email protected] <[email protected]> | 2022-11-30 22:00:41 -0800 |
|---|---|---|
| committer | [email protected] <[email protected]> | 2022-11-30 22:00:41 -0800 |
| commit | 02dd8532e22438add50f721996c47015a89a0f09 (patch) | |
| tree | 0b5324cd77f2019f308a27e93c77e680c064deb9 | |
| parent | Setting up GitHub Classroom Feedback (diff) | |
| download | archived-cst116-lab3-smith-benjamin-02dd8532e22438add50f721996c47015a89a0f09.tar.xz archived-cst116-lab3-smith-benjamin-02dd8532e22438add50f721996c47015a89a0f09.zip | |
Lotso of work
| -rw-r--r-- | BlankConsoleLab/BlankConsoleLab.cpp | 30 | ||||
| -rw-r--r-- | BlankConsoleLab/BlankConsoleLab.vcxproj | 8 | ||||
| -rw-r--r-- | large.txt | 48 |
3 files changed, 76 insertions, 10 deletions
diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp index ed5f807..4464803 100644 --- a/BlankConsoleLab/BlankConsoleLab.cpp +++ b/BlankConsoleLab/BlankConsoleLab.cpp @@ -1,16 +1,34 @@ // BlankConsoleLab.cpp : This file contains the 'main' function. Program execution begins and ends there. -// +/* +* Benjamin Smith +* CST 116 +* Lab 3 +*/ #include <iostream> +#include <fstream> +#include <iomanip> using namespace std; -using std::cout; -using std::cin; -using std::endl; +int counter = 0; +int pickup[50], dropoff[50], passengers[50]; +double distance_trav[50], fare[50], toll[50]; int main() { - cout << "Hello World!\n"; -} + ifstream newfile; + newfile.open("C:\\Users\\cowpi\\source\\repos\\cst116-lab3-Smith-Benjamin\\large.txt"); + if (newfile.is_open()) { + while (!newfile.eof()) { + newfile >> pickup[counter] >> dropoff[counter] >> passengers[counter] >> distance_trav >> fare[counter] >> toll[counter]; + counter++; + } + } + + newfile.close(); + + for (int counter = 0; counter < 50; counter++) + cout << pickup[counter] << " " << dropoff[counter] << " " << passengers[counter] << " " << distance_trav[counter] << " " << fare[counter] << " " << toll[counter] << endl; +}
\ No newline at end of file diff --git a/BlankConsoleLab/BlankConsoleLab.vcxproj b/BlankConsoleLab/BlankConsoleLab.vcxproj index db2e734..d2e3ee2 100644 --- a/BlankConsoleLab/BlankConsoleLab.vcxproj +++ b/BlankConsoleLab/BlankConsoleLab.vcxproj @@ -29,26 +29,26 @@ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> - <PlatformToolset>v142</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> <CharacterSet>Unicode</CharacterSet> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> - <PlatformToolset>v142</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> <WholeProgramOptimization>true</WholeProgramOptimization> <CharacterSet>Unicode</CharacterSet> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> - <PlatformToolset>v142</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> <CharacterSet>Unicode</CharacterSet> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> - <PlatformToolset>v142</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> <WholeProgramOptimization>true</WholeProgramOptimization> <CharacterSet>Unicode</CharacterSet> </PropertyGroup> diff --git a/large.txt b/large.txt new file mode 100644 index 0000000..1c3dbbb --- /dev/null +++ b/large.txt @@ -0,0 +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 +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 |