i have done this code which can do add, sub, mul, div and square. But this much function is not sufficient for a calculator. I want to add one exponential function and one square root function. plz help me frens
Printable View
i have done this code which can do add, sub, mul, div and square. But this much function is not sufficient for a calculator. I want to add one exponential function and one square root function. plz help me frens
for square root:
Powers:Code:{
double param, result;
param = 1024.0;
result = sqrt (param);
printf ("sqrt(%lf) = %lf\n", param, result );
return 0;
}
A simpler version of power:Code:printf ("7 ^ 3 = %lf\n", pow (7,3));
printf ("4.73 ^ 12 = %lf\n", pow (4.73,12));
printf ("32.01 ^ 1.54 = %lf\n", pow (32.01,1.54));
return 0;
Code:pow(2, 3); //2 to the 3rd power