From 02dd8532e22438add50f721996c47015a89a0f09 Mon Sep 17 00:00:00 2001 From: "smithbenjamin2022@gmail.com" Date: Wed, 30 Nov 2022 22:00:41 -0800 Subject: Lotso of work --- BlankConsoleLab/BlankConsoleLab.cpp | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) (limited to 'BlankConsoleLab/BlankConsoleLab.cpp') 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 +#include +#include 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 -- cgit v1.2.3