SHOW:
|
|
- or go back to the newest paste.
1 | #include <stdio.h> | |
2 | #include <stdlib.h> | |
3 | ||
4 | int main() | |
5 | { | |
6 | int a, b; | |
7 | puts("Ingrese los valores a intercambiar:"); | |
8 | scanf("%d",&a); | |
9 | scanf("%d",&b); | |
10 | ||
11 | printf("Los valores sin intercambiar son: a=%d b=%d\n", a, b); | |
12 | int atemp = a; | |
13 | a=b; | |
14 | b=atemp; | |
15 | ||
16 | printf("Los valores ahora son: a=%d b=%d", a, b); | |
17 | return 0; | |
18 | } | |
19 |