summaryrefslogtreecommitdiff
path: root/3p45.cpp
diff options
context:
space:
mode:
authorOskar <[email protected]>2024-08-15 18:16:33 +0200
committerOskar <[email protected]>2024-08-15 18:16:33 +0200
commit38e3c732d86165a84cd872e96e10ca1e811f2bb1 (patch)
tree5afc858281bd4d1cf9da8eb1b9034fe73d48435c /3p45.cpp
parentbec90eeec483f4fd685bb28758cdf55897bc0b3e (diff)
more exercises
Diffstat (limited to '3p45.cpp')
-rw-r--r--3p45.cpp49
1 files changed, 49 insertions, 0 deletions
diff --git a/3p45.cpp b/3p45.cpp
new file mode 100644
index 0000000..0116a88
--- /dev/null
+++ b/3p45.cpp
@@ -0,0 +1,49 @@
+#include <iostream>
+#include <vector>
+#include "sales_data.hpp"
+#include "sales_item.hpp"
+#include <iterator>
+
+/*
+ *
+ * 3.45
+ *
+ *
+ */
+
+int main () {
+
+ int ia[3][4] = {
+ {1,2,3,4},
+ {5,6,7,8},
+ {9,10,11,12}
+ };
+
+ for (auto &a : ia) {
+ for (auto aa : a) {
+ std::cout << aa << " ";
+ }
+
+ std::cout << std::endl;
+ }
+
+ std::cout << std::endl;
+ for(size_t i = 0 ; i != 3 ; ++i) {
+ for(size_t j = 0 ; j != 4 ; ++j) {
+ std::cout << ia[i][j] << " ";
+ }
+
+ std::cout << std::endl;
+ }
+
+ std::cout << std::endl;
+ for(auto p = std::begin(ia) ; p != std::end(ia) ; ++p) {
+ for(auto pp = std::begin(*p) ; pp != std::end(*p) ; ++pp) {
+ std::cout << *pp << " ";
+ }
+
+ std::cout << std::endl;
+ }
+
+ return 0;
+}