Hello everyone,
IDE is Code::Blocks 10.05
When I compile the following
I get 0 as the result. How is that possible? I read that you can useCode:#include <stdio.h> int main () { int a = 30 ; float b = 50.5 ; printf ("%i + %f = %i", a, b, a + b) ; getchar () ; return 0 ; }
expression instead of variables in the arguments which is what I did
exactly. If I add one more variable for eg. int result = a + b
and then instead of a+b i write result then I get the desired output
i.e. 80
Please help