I am a complete beginner so I'm not sure if I'm doing this right. My code keeps giving me 0.00 as an answer so my formula is probably the problem. Please help.
[note: presentValue is what I'm solving for, everything else the user inputs]
{
double presentValue;
int futureValue;
int interestRate;
int numberOfYears;
cout<<"Enter the number of years: "<<endl;
cin>>numberOfYears;
cout<<"Enter your future value: "<<endl;
cin>>futureValue;
cout<<"Enter your rate(as decimal): "<<endl;
cin>>interestRate;
presentValue = (futureValue / pow((1+interestRate),numberOfYears));
cout<<"\n";
cout<<fixed<<showpoint<<setprecision(2);
cout<<"Your present value is: " <<presentValue<<endl;