20 lines
301 B
C
20 lines
301 B
C
/* Inversion de variables */
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
int main() {
|
|
int tmp;
|
|
int var1 = 123;
|
|
int var2 = 18;
|
|
|
|
printf("var1=%d et var2=%d\n", var1, var2);
|
|
|
|
tmp = var1;
|
|
var1 = var2;
|
|
var2 = tmp;
|
|
|
|
printf("var1=%d et var2=%d\n", var1, var2);
|
|
|
|
return 0;
|
|
}
|