summaryrefslogtreecommitdiff
path: root/6p21.cpp
diff options
context:
space:
mode:
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;
+}