I am new to C and thought that I would just try out doing some simple adding. Whenever I run it the answer is 0. I was wondering what I was doing wrong. Here is the code:
Any and all help appreciated.
Code:
#include <stdio.h>
main()
{
float ans;
ans=1+1;
printf(" %d", ans);
}
Comment