1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
#include <iostream> using namespace std; void show(int m, int n); void swap(int a, int b); int main() { int a = 5; int b = 7; show(a, b); swap(a, b); show(a, b); return 0; } void show(int m, int n) { cout << "Getallen: " << m << ", " << n << endl; } void swap(int a, int b) { int h; h = a; a = b; b = h; }