hey my question is i have a program that computers the power and the source code is like
this:
Code:
#include <stdio.h>
int main(void)
{
int exp,c;
double pow=1,bse;
scanf("%lf %d",&bse,&exp);
for(c=0;c<exp;c++)
pow*=bse;
printf("%f ",pow);
return 0;
}
Input is : 95 12
Output is: 540360087662636990000000.000000
My question is that the output is not really accurate because when i type it on the
calculator the output is this :540360087668636962890685 could someone explain to me
why this happens?? and if how could i program correctly so that i could came out an
accurate output.. Thanks!