summaryrefslogtreecommitdiff
path: root/6p21.cpp
diff options
context:
space:
mode:
authorOskar <[email protected]>2024-09-06 17:10:32 +0200
committerOskar <[email protected]>2024-09-06 17:10:32 +0200
commitcc01160a3f0fdcb27eb931f67e85d783d0f5626d (patch)
tree3574e221430241d8b9e11c73ae27cc1301b015f9 /6p21.cpp
parent9b73f5889937d88796b45126f6165027fecd3436 (diff)
more
Diffstat (limited to '6p21.cpp')
-rw-r--r--6p21.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/6p21.cpp b/6p21.cpp
new file mode 100644
index 0000000..8b84857
--- /dev/null
+++ b/6p21.cpp
@@ -0,0 +1,27 @@
+#include <iostream>
+
+/*
+ *
+ * 6.21
+ *
+ *
+ */
+
+int islarger(int i1, const int *i2) {
+
+ if(i1 > *i2) {
+ return i1;
+ }
+
+ return *i2;
+}
+
+int main () {
+
+ int a = 101;
+ int b = 253;
+ int c = 0;
+ c = islarger(a, &b);
+ std::cout << c << std::endl;
+ return 0;
+}