diff options
author | RossTheRoss <msattr@gmail.com> | 2019-03-10 16:24:04 -0500 |
---|---|---|
committer | RossTheRoss <msattr@gmail.com> | 2019-03-10 16:24:04 -0500 |
commit | e6d9e367d2e87ef00fddae9d3c61041d95488225 (patch) | |
tree | c5e51f6f3c57086a0781162aa84295aa3eb66728 /ee1301/wk4/hw4_directory/strap012_HW4A.cpp | |
parent | C O M M E N T S (diff) | |
download | homework-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.cpp | 26 |
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 |