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 /BlankConsoleLab | |
| 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
Diffstat (limited to 'BlankConsoleLab')
| -rw-r--r-- | BlankConsoleLab/BlankConsoleLab.cpp | 30 | ||||
| -rw-r--r-- | BlankConsoleLab/BlankConsoleLab.vcxproj | 8 |
2 files changed, 28 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> |