Advertisement
Guest User

Untitled

a guest
Oct 24th, 2014
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.25 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main ()
  4.  
  5. {
  6.     double d = 12.3;
  7.     int i;
  8.     i = (int)d;
  9.     printf("Valore doppio d convertito in intero: %d\n", i);
  10.    
  11.     int h = 5;
  12.     double p;
  13.     p = (double)h;
  14.     printf("Valore intero convertito in doppio: %d\n", p);
  15.     return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement