18 lines
299 B
C
18 lines
299 B
C
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
|
||
|
int swip(int a, int b) {
|
||
|
int res1 = a;
|
||
|
int res2 = b;
|
||
|
b = res1;
|
||
|
a = res2;
|
||
|
}
|
||
|
|
||
|
int main(void) {
|
||
|
int on = 5;
|
||
|
int off = 12;
|
||
|
printf("on = %d / off = %d\n", on, off);
|
||
|
swip(on, off);
|
||
|
printf("on = %d / off = %d\n", on, off);
|
||
|
return EXIT_SUCCESS;
|
||
|
}
|