From e40bb0f3a6fdd371a938dc99cf05ef743c24bc91 Mon Sep 17 00:00:00 2001 From: hg398 Date: Fri, 26 Oct 2018 14:03:32 -0700 Subject: [PATCH] Issue #20 A tricky C++ program to find max of two numbers. --- c++/max_of_two_numbers.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 c++/max_of_two_numbers.h diff --git a/c++/max_of_two_numbers.h b/c++/max_of_two_numbers.h new file mode 100644 index 0000000..1107efb --- /dev/null +++ b/c++/max_of_two_numbers.h @@ -0,0 +1,24 @@ + +// BY hg398 + +#include +using namespace std; +#define ll long long int +#define boost ios_base::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL) +#define FOR(i,a,b) for(int i=a;i<=b;i++) + +int largest(int a,int b) +{ + return a*(bool)(a/b) + b*(bool)(b/a); +} + +int main() { + boost; + int num1,num2; + cin>>num1>>num2; + if(num1==num2) + cout<