summaryrefslogtreecommitdiff
path: root/2p40.cpp
diff options
context:
space:
mode:
authorOskar <[email protected]>2024-08-01 12:11:23 +0200
committerOskar <[email protected]>2024-08-01 12:11:23 +0200
commit0de72ab100011ab54f99f298e936327011ebc706 (patch)
treeb0658b0e5d9b67b214e03177f7d08704038eed14 /2p40.cpp
parenta450487a18ec72ea3a3815bfaf17b2f701796b6f (diff)
more exercises
Diffstat (limited to '2p40.cpp')
-rw-r--r--2p40.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/2p40.cpp b/2p40.cpp
new file mode 100644
index 0000000..2247529
--- /dev/null
+++ b/2p40.cpp
@@ -0,0 +1,28 @@
+#include <iostream>
+
+
+/*
+ *
+ * 2.40
+ *
+ *
+ */
+
+struct SalesData {
+ std::string BookNo;
+ unsigned int UnitsSold = 0;
+ double Revenue = 0.0;
+};
+
+int main () {
+
+ struct SalesData Book;
+ Book.BookNo = "this is the BookNo";
+ Book.UnitsSold = 243;
+ Book.Revenue = 3294;
+ std::cout << Book.BookNo << "\n"
+ << Book.UnitsSold << "\n"
+ << Book.Revenue
+ << std::endl;
+ return 0;
+}