Código
fuente |
|
#include
<stdio.h>
int
main()
{
printf( "%.2f",
4.
);
printf( "\n%.2f",
4
);
printf( "\n%.2f",
( float )
4
);
printf( "\n%.2f",
( float )
5
/ 2
);
printf( "\n%.2f",
( float )
( 5
/ 2
) );
printf( "\n%.2f",
5
/ 2
);
printf( "\n%d",
5
/ 2
);
printf( "\n%d",
4.
);
printf( "\n%d",
( int ) 4. );
printf( "\n%.3f",
( double
) 3
/ 2
);
return 0;
} |
|
|