From 12f648998464e7820e2be633e4d999c285047bce Mon Sep 17 00:00:00 2001 From: Oskar Date: Wed, 9 Oct 2024 16:55:14 +0200 Subject: more --- 9p15.cpp | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 9p15.cpp (limited to '9p15.cpp') diff --git a/9p15.cpp b/9p15.cpp new file mode 100644 index 0000000..1a150b0 --- /dev/null +++ b/9p15.cpp @@ -0,0 +1,41 @@ +#include +#include +#include +/* + * + * 9.15 + * + * + */ + +int main () { + + std::vector v1; + std::vector v2; + int in = 0; + std::cout << "v1" << std::endl; + for(int i = 0 ; i < 10 ; ++i) { + if(std::cin >> in) {} else { + std::cout << "Error: Wrong input." << std::endl; + return -1; + } + + v1.push_back(in); + } + + std::cout << "v2" << std::endl; + for(int i = 0 ; i < 10 ; ++i) { + if(std::cin >> in) {} else { + std::cout << "Error: Wrong input." << std::endl; + return -1; + } + + v2.push_back(in); + } + + if(v1 == v2) { + std::cout << "equal!" << std::endl; + } + + return 0; +} -- cgit v1.2.3