This commit is contained in:
2025-11-30 01:51:19 +03:00
commit 37237f67f8
12 changed files with 191 additions and 0 deletions

20
swap2.cpp Normal file
View File

@@ -0,0 +1,20 @@
#include <iostream>
using namespace std;
void swap2 (int &val1, int &val2) {
int temp = val1;
val1 = val2;
val2 = temp;
}
int main (void) {
int x = 1;
int y = 3;
swap2(x, y);
cout << x << y << endl;
return 0;
}