diff options
author | Oskar <[email protected]> | 2024-07-28 12:52:38 +0200 |
---|---|---|
committer | Oskar <[email protected]> | 2024-07-28 12:52:38 +0200 |
commit | 5aac3c3f8bcfef0b2aad28d91d87b9ebf1d5e7df (patch) | |
tree | 38736b9f0c57f69e272121e0fc1f3969bb7468e2 /1p22-2.cpp |
first commit
Diffstat (limited to '1p22-2.cpp')
-rw-r--r-- | 1p22-2.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/1p22-2.cpp b/1p22-2.cpp new file mode 100644 index 0000000..2196916 --- /dev/null +++ b/1p22-2.cpp @@ -0,0 +1,22 @@ +#include <iostream> +#include "sales_item.hpp" + +/* + * + * Exercise 1.22 (Not made by me) + * + * + */ + +int main() { + + Sales_item total, item; + if (std::cin >> total) { + while (std::cin >> item) + total += item; + + std::cout << total << std::endl; + } + + return 0; +} |