summaryrefslogtreecommitdiff
path: root/week_1/review_program/review_program.cpp
diff options
context:
space:
mode:
authorFuwn <[email protected]>2023-09-26 22:43:48 -0700
committerFuwn <[email protected]>2023-09-26 22:43:48 -0700
commit61adbbcab7abf608925c8ceeb26b4261fed99961 (patch)
tree385a432cc9aaf500c7d64f5de786ba130a4c4fe6 /week_1/review_program/review_program.cpp
parentstyle(review_program): implement styles (diff)
downloadcs260-61adbbcab7abf608925c8ceeb26b4261fed99961.tar.xz
cs260-61adbbcab7abf608925c8ceeb26b4261fed99961.zip
docs(review_program): comments
Diffstat (limited to 'week_1/review_program/review_program.cpp')
-rw-r--r--week_1/review_program/review_program.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/week_1/review_program/review_program.cpp b/week_1/review_program/review_program.cpp
index e6efe64..399bf96 100644
--- a/week_1/review_program/review_program.cpp
+++ b/week_1/review_program/review_program.cpp
@@ -27,7 +27,7 @@ void InputToTextbook(Textbook &textbook) {
textbook.SetIsRequired(
InputToTextbookValue<bool>("Required (1 = required, 0 = optional)"));
textbook.SetIsUsed(InputToTextbookValue<bool>("Used (1 = used, 0 = new)"));
-}
+} // void InputToTextbook(Textbook &textbook)
template <typename T> T InputToTextbookValue(const std::string &message) {
// Helper for repetitive textbook value prompts
@@ -37,7 +37,7 @@ template <typename T> T InputToTextbookValue(const std::string &message) {
std::cin >> value;
return value;
-}
+} // template <typename T> T InputToTextbookValue(const std::string &message)
void TextbookInputHandler(std::vector<Textbook> &textbooks) {
// 1. Input textbook
@@ -61,7 +61,7 @@ void TextbookInputHandler(std::vector<Textbook> &textbooks) {
std::cout << "---" << std::endl;
textbooks.push_back(textbook);
-}
+} // void TextbookInputHandler(std::vector<Textbook> &textbooks)
void FullTextbookPurchaseSummary(const std::vector<Textbook> &textbooks) {
double total_for_all_books = 0.0;
@@ -75,7 +75,7 @@ void FullTextbookPurchaseSummary(const std::vector<Textbook> &textbooks) {
std::cout << "\n---\nTotal cost for all books: $" << total_for_all_books
<< std::endl;
std::cout << "Expected profit: $" << total_for_all_books * 0.2 << std::endl;
-}
+} // void FullTextbookPurchaseSummary(const std::vector<Textbook> &textbooks)
} // namespace wk1_reviewProgram_zSzabatin
@@ -95,4 +95,4 @@ int main() {
wk1_reviewProgram_zSzabatin::FullTextbookPurchaseSummary(textbooks);
return 0;
-}
+} // int main()