First step is to just write a program that asks you to enter a value, then use cin to get the value from the keyboard. Once you have that going (compiled without error and runs correctly) you can add the other stuff to it, whic to write a function that contains that formula and returns the result. The function needs one parameter -- the value of x.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343