Summary Files Commits Branches @commit @diff @stats
path: root / Year 1 / Object-oriented Programming / Exam 1 / ex1 / source.cpp
diff options
context:
space:
mode:
Commit9f61b59ca6ceb76cd634240d118f5771c0534f3d (patch)
Author
 Syndamia <kamen.d.mladenov@protonmail.com>
2022-04-20 18:43:21 +0300
Committer
 Syndamia <kamen.d.mladenov@protonmail.com>
2022-04-20 18:43:21 +0300
Files3fa15098faa79b5df0927e92dae0125c447ac1be /Year 1/Object-oriented Programming/Exam 1/ex1/source.cpp
uni-projects-9f61b59ca6ceb76cd634240d118f5771c0534f3d.tar
uni-projects-9f61b59ca6ceb76cd634240d118f5771c0534f3d.tar.gz
uni-projects-9f61b59ca6ceb76cd634240d118f5771c0534f3d.zip
Parent26cf424c42f9cdc172191faa5b2d1c1fcf350143 (diff)
Added my work from todays exam
1 files changed, 15 insertions, 0 deletions
-rw-r--r--Year 1/Object-oriented Programming/Exam 1/ex1/source.cpp15
diff --git a/Year 1/Object-oriented Programming/Exam 1/ex1/source.cpp b/Year 1/Object-oriented Programming/Exam 1/ex1/source.cpp
new file mode 100644
index 0000000..5f741df
--- /dev/null
+++ b/Year 1/Object-oriented Programming/Exam 1/ex1/source.cpp
@@ -0,0 +1,15 @@
+#include <iostream>
+#include "NaturalNumbers.h"
+
+int main() {
+ int numArr1[] = { 1, 2, 3 }, numArr2[] = { -1, 0, 2, 3, 4 }, numArr3[] = { -1000, 0, -9, -9, 10, 0, 0, 0, 1, -46 };
+ NaturalNumbers nums, nums1(numArr1, 3, "Nums1"), nums2(numArr2, 5, "Nums2"), nums3(numArr3, 10, "Nums3");
+ std::cout << nums << nums1 << nums2 << nums3 << std::endl;
+ nums1 += nums2;
+ std::cout << nums2 << std::endl;
+ NaturalNumbers nums4 = nums2 + nums3;
+ std::cout << nums4 << std::endl;
+ NaturalNumbers nums5;
+ std::cin >> nums5;
+ std::cout << nums5 << " " << nums5[13] << std::endl;
+}