summaryrefslogtreecommitdiff
path: root/testapp/c_cpp_files/greatest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'testapp/c_cpp_files/greatest.cpp')
-rw-r--r--testapp/c_cpp_files/greatest.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/testapp/c_cpp_files/greatest.cpp b/testapp/c_cpp_files/greatest.cpp
new file mode 100644
index 0000000..0194855
--- /dev/null
+++ b/testapp/c_cpp_files/greatest.cpp
@@ -0,0 +1,15 @@
+int greatest(int a,int b,int c)
+{
+ if(a>b && a>c)
+ {
+ return a;
+ }
+ else if(b>c)
+ {
+ return b;
+ }
+ else
+ {
+ return c;
+ }
+}