diff options
| -rw-r--r-- | CST116-Lab3-Pseudocode- Bishop.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/CST116-Lab3-Pseudocode- Bishop.txt b/CST116-Lab3-Pseudocode- Bishop.txt index 06ac5cb..bcb9ebd 100644 --- a/CST116-Lab3-Pseudocode- Bishop.txt +++ b/CST116-Lab3-Pseudocode- Bishop.txt @@ -55,15 +55,15 @@ int totals(int totalpeople) Here we have our function that we have with the inf double totalfare1[] = { 84, 15, 12, 13 }; Here we have the array again of total fares
totalpeople = 15;
- cout << totalfare1 << endl; Here we print out the arrary of total fares
+ cout << totalfare1 <<"is total fares"<< endl; Here we print out the arrary of total fares
int totalpaid = 0;
for (int i = 0; i < 4; i++) {
totalpaid = totalpaid + totalfare1[i]; Here we loop around the array and get the total paid variable.
}
- cout << totalpaid << endl;
+ cout << totalpaid <<"is total paid"<< endl;
float avgcostperperson;
avgcostperperson = totalpaid / totalpeople; Here we are printing out the variables of total cost and paid and the total fares to the screen
- cout << avgcostperperson; Here we are printing out the rest of our information
+ cout << avgcostperperson<<"is average cost per person."; Here we are printing out the rest of our information
ofstream file_("totals.txt");
inFile.open("totals.txt");
if (file_.is_open()) {
|