From 0de72ab100011ab54f99f298e936327011ebc706 Mon Sep 17 00:00:00 2001 From: Oskar Date: Thu, 1 Aug 2024 12:11:23 +0200 Subject: more exercises --- 2p41-1p20.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 2p41-1p20.cpp (limited to '2p41-1p20.cpp') diff --git a/2p41-1p20.cpp b/2p41-1p20.cpp new file mode 100644 index 0000000..8cbd0b1 --- /dev/null +++ b/2p41-1p20.cpp @@ -0,0 +1,25 @@ +#include +#include "sales_item.hpp" + +/* + * + * 2.41 - 1.20 + * + * + */ + +struct SalesData { + std::string BookNo; + unsigned int UnitsSold = 0; + double Revenue = 0.0; +}; + +int main () { + + SalesData book1; + while(std::cin >> book1.BookNo >> book1.UnitsSold >> book1.Revenue) { + std::cout << book1.BookNo << " " << book1.UnitsSold << " " << book1.Revenue << std::endl; + } + + return 0; +} -- cgit v1.2.3