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
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
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.