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/BlankConsoleLab.cpp | |
| parent | Setting up GitHub Classroom Feedback (diff) | |
| download | cst116-lab3-smith-benjamin-02dd8532e22438add50f721996c47015a89a0f09.tar.xz cst116-lab3-smith-benjamin-02dd8532e22438add50f721996c47015a89a0f09.zip | |
Lotso of work
Diffstat (limited to 'BlankConsoleLab/BlankConsoleLab.cpp')
| -rw-r--r-- | BlankConsoleLab/BlankConsoleLab.cpp | 30 |
1 files changed, 24 insertions, 6 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 |