/* 0604.c: Using the cast operator */
#include <stdio.h>
main()
{
int x, y;
x = 7;
y = 5;
printf("Given x = %d, y = %d\n", x, y);
printf("x / y produces: %d\n", x / y);
printf("(float)x / y produces: %f\n", (float)x / y);
return 0;
}
#include <stdio.h>
main()
{
int x, y;
x = 7;
y = 5;
printf("Given x = %d, y = %d\n", x, y);
printf("x / y produces: %d\n", x / y);
printf("(float)x / y produces: %f\n", (float)x / y);
return 0;
}