From a805c55e5b870ec3f65ce9dd5fdf6f5456a62ac3 Mon Sep 17 00:00:00 2001 From: Oskar Date: Wed, 7 Aug 2024 16:35:33 +0200 Subject: more exercises --- 3p14.cpp | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 3p14.cpp (limited to '3p14.cpp') diff --git a/3p14.cpp b/3p14.cpp new file mode 100644 index 0000000..b11a9ff --- /dev/null +++ b/3p14.cpp @@ -0,0 +1,39 @@ +#include +#include +#include "sales_data.hpp" +#include "sales_item.hpp" + +/* + * + * 3.14 + * + * Not exactly according to instructions but still learned from making this. + */ + +using std::string; +using std::cout; +using std::cin; +using std::cerr; +using std::clog; +using std::endl; +using std::vector; +int main () { + + int n; + vector vn; + if(cin >> n) { + vn.push_back(n); + while(cin >> n){ + vn.push_back(n); + } + + } else { + return -1; + } + + for(auto vni : vn) { + cout << vni << endl; + } + + return 0; +} -- cgit v1.2.3