From 0efc16980716b0e92b92057e2ab88c497127ad53 Mon Sep 17 00:00:00 2001 From: SunnyChaturvedi <43118715+SunnyChaturvedi@users.noreply.github.com> Date: Tue, 2 Oct 2018 20:42:17 +0530 Subject: [PATCH] Create cpp file for hack2ber --- cpp file for hack2ber | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 cpp file for hack2ber diff --git a/cpp file for hack2ber b/cpp file for hack2ber new file mode 100644 index 0000000..a956a99 --- /dev/null +++ b/cpp file for hack2ber @@ -0,0 +1,19 @@ +#include +using namespace std; + +int main() +{ + int a = 5, b = 10, temp; + + cout << "Before swapping." << endl; + cout << "a = " << a << ", b = " << b << endl; + + temp = a; + a = b; + b = temp; + + cout << "\nAfter swapping." << endl; + cout << "a = " << a << ", b = " << b << endl; + + return 0; +}