int a=pow(100,2);//line 1
int b=ceil(pow(100,2));//line 2
cout<<pow(100,2);//line 3
line 1 gives a=9999
on printing the value of a
line 2 gives b=10000
on printing value of b
line 3 prints 10000
I understood that pow give value 9999.9999
so ceil func. in line 2 gives it the upper value.
But why didn't cout print 9999.9999
Can anyone explain why pow behave like this return decimal value pow is just a power function why doesn't it simply give 100*100
as answer?