My calculating problem,
It is about the sinh x, cosh x and tanh x function,
the formula given is :
sinh x = (e^x - e^(-x))/2
cosh x = (e^x + e^(-x))/2
The program keep showing the result 0.
and i m not very sure about my formula in the code.
this program is not allowed to use <cmath> function.
I would suggest testing your functions separately from the rest of your program. Also, using global variables like that makes the program flow REALLY confusing. For example, in your fac() function, you never even use your input parameter, but you use -and modify- some global variables. If you called the same function twice you'll get different results!
Also:
1 2 3
if (selection = 1)
should be
if (selection == 1)
Change it for the others to.
= is assignment operator
== is equality tester
Also, I'm not sure why your goal with the pow function is. Once again, your function isn't using any input parameter, a power function would usually have 2 parameters.
You also never define the constant "e" (2.718..) anywhere. Saying "e to the x" is like saying multiple e by itself x times.
Here's a working example of an exp (e to the x) function, you should be able to apply this to your code.