Developpement/23DEV1.1/TPS1/TP01/15-Fonctions/echange.c

18 lines
299 B
C
Raw Permalink Normal View History

2024-12-09 11:53:11 +01:00
#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;
}