Advertisement
Igor2909

es2.c

Oct 16th, 2017
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.40 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. main()
  5. {
  6.     int a, b, c; //c variabile di scambio
  7.     printf("Inserisci la prima variabile ");
  8.     scanf("%d" , &a);
  9.     printf("Inserisci la seconda variabile ");
  10.     scanf("%d" , &b);
  11.    
  12.     c = a ;
  13.     a = b ;
  14.     b = c ;
  15.    
  16.     printf("Lo scambio e' avvenuto \nIl primo valore ora e' %d \nIl secondo valore  il secondo valore ora e' %d \n" , a, b);
  17.     system("PAUSE");
  18.    
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement