MCPcopy Create free account
hub / github.com/Rustam-Z/cpp-programming / main

Function main

Lab_01/13_swapping.cpp:6–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4using namespace std;
5
6int main() {
7 float a, b;
8
9 cout << "Enter first number: ";
10 cin >> a;
11 cout << "Enter second number: ";
12 cin >> b;
13
14 a = a + b;
15 b = a - b;
16 a = a - b;
17
18 cout << "We have swapped your numbers, result in below." << endl;
19 cout << "a = " << a << endl;
20 cout << "b = " << b << endl;
21
22 system("pause");
23 return 0;
24}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected