<< ” y: ” 13:

<< ” y: ”
13: << y << “n”;
14:
15: swap(x,y);
16:
17: cout << “Funkcja main(). Po funkcji swap(), x: ” << x << ” y: ”
18: << y << “n”;
19:
20: return 0;
21: }
22:
23: void swap (int &rx, int &ry)
24: {
25: int temp;
26:
27: cout << “Funkcja swap(). Przed zamiana, rx: ” << rx << ” ry: ”
28: << ry << “n”;
29:
30: temp = rx;
31: rx = ry;
32: ry = temp;
33:
34:
35: cout << “Funkcja swap(). Po zamianie, rx: ” << rx << ” ry: ”
36: << ry << “n”;
37:
38: }

Wynik

Random Posts




You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply