#include <stdio.h>
#include <math.h>
int main()
{
int i = 11;
printf("%d ^ 2 = %d\n",i,(int)pow(i,2));
getchar();
return 0;
}
In this case instead of getting 121,i am getting 120.What is the mistake i am making? (I really need to print pow(i,2) as an int.)