aboutsummaryrefslogtreecommitdiffstats
path: root/ee1301/wk4/hw4_directory/strap012_HW4A.cpp
diff options
context:
space:
mode:
authorRossTheRoss <msattr@gmail.com>2019-03-10 16:24:04 -0500
committerRossTheRoss <msattr@gmail.com>2019-03-10 16:24:04 -0500
commite6d9e367d2e87ef00fddae9d3c61041d95488225 (patch)
treec5e51f6f3c57086a0781162aa84295aa3eb66728 /ee1301/wk4/hw4_directory/strap012_HW4A.cpp
parentC O M M E N T S (diff)
downloadhomework-e6d9e367d2e87ef00fddae9d3c61041d95488225.tar
homework-e6d9e367d2e87ef00fddae9d3c61041d95488225.tar.gz
homework-e6d9e367d2e87ef00fddae9d3c61041d95488225.tar.bz2
homework-e6d9e367d2e87ef00fddae9d3c61041d95488225.tar.lz
homework-e6d9e367d2e87ef00fddae9d3c61041d95488225.tar.xz
homework-e6d9e367d2e87ef00fddae9d3c61041d95488225.tar.zst
homework-e6d9e367d2e87ef00fddae9d3c61041d95488225.zip
Change \n to std::endl
Diffstat (limited to 'ee1301/wk4/hw4_directory/strap012_HW4A.cpp')
-rw-r--r--ee1301/wk4/hw4_directory/strap012_HW4A.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/ee1301/wk4/hw4_directory/strap012_HW4A.cpp b/ee1301/wk4/hw4_directory/strap012_HW4A.cpp
index fa67e7d..abedc7a 100644
--- a/ee1301/wk4/hw4_directory/strap012_HW4A.cpp
+++ b/ee1301/wk4/hw4_directory/strap012_HW4A.cpp
@@ -29,31 +29,31 @@ int main () {
} else if (score>80) {
B++;
} else if (score>70) {
- C++; //Nice.
+ C++;
} else if (score>60) {
D++;
} else {
F++;
}
}
- std::cout << A << " A\n"
- << B << " B\n"
- << C << " C\n"
- << D << " D\n"
- << F << " F\n";
+ std::cout << A << " A" << std::endl
+ << B << " B" << std::endl
+ << C << " C" << std::endl
+ << D << " D" << std::endl
+ << F << " F" << std::endl;
fin.close();
fout.open("output_files/statistics.csv");
if (!fout.is_open()) {
- std::cout << "File write failed!";
+ std::cout << "File write failed!\n";
return -2;
}
- fout << "Grade, NumStudents"
- << "\nA," << A
- << "\nB," << B
- << "\nC," << C
- << "\nD," << D
- << "\nF," << F;
+ fout << "Grade, NumStudents" << std::endl
+ << "A," << A << std::endl
+ << "B," << B << std::endl
+ << "C," << C << std::endl
+ << "D," << D << std::endl
+ << "F," << F;
fout.close();
} \ No newline at end of file