invalid operands of types ‘<unresolved overloaded function type>’ and ‘double’ to binary ‘operator*’
I have no idea what this is saying is wrong with my code....its just a compound interest program that I am writing continuing with getting used to c++ coding.
here is the whole program so far.
using namespace std;
cout<<"what are you solving for?(amount, principle, rate(decimal), time, number of compounds)(0 if missing)\n"; //prompt for variables//
a=p*(1+(r/n));exp(n*t); //formula to find the amount//
cout<<"your amount is $"<<a<<endl;
p=(a)/((1+r/n))*(exp*(n*t)); //formula to find the principle amount//
cout<<"Your principle is $"<<p<<endl;
r=n*sqrt((a/p)-1); //finding the interest rate//
cout<<"Your interest rate is "<<r<<"%\n";
n=(log(a)-log(p))/(log(1+r)); //find the number of compounds//
cout<<"your investment compunded "<<n<<" times.\n";
t=((log(a))/(log(1+(r/n))))/n; //finds the missing time//
cout<<"it took "<<t<<" years.\n";