If you change the divisor or dividend to floating-point type and then control the output, for example: printf("%0. 1f ",x); The result is 2.5.
The result will contain decimals!
# include & ltstdio.h & gt
void main()
{
Floating point a = 5.0
int b = 2;
printf("%0. 1f ",a/b);
}