1. ## Float point number

Hi I was wondering if anyone knew of any good resources that could point me in the right direction for learning about float points. Basically all I want to do is divide two numbers like 5/2 and be able to print it with something other than just 2.
BTW. I'm using code blocks, not that that really means anything.

Any help would be greatly appreciated....

2. Do you mean type casting? You can also declare a variable like result as a float and then if you divide 5 by 2 it will come out as a float.

ex.

3. thanks Camel-man for the help, please take a look at a sample of what i have
Here's basically what I would like to accomplish. When I run this code, it just comes back with a zero....hmmmm
Code:
```#include <stdio.h>
#include <stdlib.h>

int main()
{
int num1;
int num2;
float div;

printf("What number to divide :\n");
scanf("%d", &num1);
printf("By : \n");
scanf("%d", &num2);

div = (float) num1 / num2;

return 0;
}```

4. In your final printf statment you are displaying it as a regular integer example is %d, what you need is %f for float. If you want to display only up to two decimals you can say %.2f instead of %f.