/*
Lauren Dukes
CPSC 1110 example

Integer division.
Although 1/2 is 0.5, this program will display 0 as the result.
The result is declared as an float, so it is capable of storing a floating point value.
There is one error in this program.
Because both x and y are integers, the compiler chooses 'integer' as the level of precision
to perform the division. Because 1 cannot be divided by 2 and remain an integer, the result is 0.
*/

#include <stdio.h>

int main(void){
	int x = 1;
	int y = 2;
	float result = x / y;
	printf("division result is %f\n",result);
	return 0;
}
