1. ## Simple expression

Why is the following evaluated to 8.625000?

firstly the expression within brackets are evaluated (3.5 * q) = 9.8
secondly 2.5 * c = 4.5
lastly, the division operator (3.5 * q) / 1.6) = 6.125

i can't match the final answer that is printed

Code:
```#include <stdio.h>

int main()
{
int c = 1.8;
float q = 2.8;

float total = (2.5 * c + (3.5 * q) / 1.6);
printf("%f", total);
}```

2. Originally Posted by Axel
Code:
```#include <stdio.h>

int main()
{
int c = 1.8;//problem is here
float q = 2.8;

float total = (2.5 * c + (3.5 * q) / 1.6);
printf("%f", total);
}```
const double is converted to integer(loss of data).....
use
Code:
`float c=1.8f`

3. Originally Posted by Axel
Why is the following evaluated to 8.625000?
In general, if the program's calculations give the "wrong" answer, make sure the program is working on the values that you think it is:

Code:
```#include <stdio.h>

int main()
{
int c = 1.8;
float q = 2.8;

float total = (2.5 * c + (3.5 * q) / 1.6);

printf("c = %d, q = %f\n", c, q); /* what's going on here? */

printf("%f", total);
return 0;
}```
c = 1, q = 2.800000
8.625000
D