Skip to content

Instantly share code, notes, and snippets.

@DO162
Created May 5, 2025 20:47
Show Gist options
  • Save DO162/e2b8445a51743d33411502047513cb94 to your computer and use it in GitHub Desktop.
Save DO162/e2b8445a51743d33411502047513cb94 to your computer and use it in GitHub Desktop.
DZ_13_(17.04.25)
#include <iostream>
using namespace std;
void obmin(int* a, int* b) {
int c = *a;
*a = *b;
*b = c;
}
int main() {
int a = 10;
int b = 20;
cout << "a = " << a << ", b = " << b << "\n\n";
obmin(&a, &b);
cout << "a = " << a << ", b = " << b << "\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment