I'm trying to divide two numbers together and print the answer but the compiler always gives 1.000000 as the answer, Iv'e tried changing the literals but the answer is still the same somewhat.
Here is my code:
#include <stdio.h>
int main()
{
float a = 20 / 12;
printf ("%f", a);
}
Any ideas why this happens and how to get the right answer?