#include <cstdlib>
#include <iostream>
usingnamespace std;
int main(int argc, char *argv[])
{
int amount, newAmount, interestRate;
cout <<"Please enter the dollar amount."<<endl;
cin>> amount;
cout <<"Please enter the interest rate(e.g., nine percet should be entered as 9.0). "<<endl;
cin>> interestRate;
newAmount = ( amount, interestRate); { amount *= (interestRate/100);
std::cout << "The new amount is: " << amount << std::endl;
cout <<"The new dollar amount is "<< newAmount<<endl;
}
return 0;
}
// i know this is incomplete i do not know what i am to do next i have some idea just do not know how to make the function properly i guess . can some one help me figure this out the algorithm is below
alogrithm:
// Start
// Declarations
// num amount
// num newAmount
// num interestRate
// output "Please enter the dollar amount. "
// input amount
// output "Please enter the interest rate(e.g., nine percet should be entered as 9.0). "
// input interestRate
// newAmount = FutureValue(amount,interestRate)
// output "The new dollar amount is ", newAmount
// Stop
//
//
//
// num FutureValue(num initialAmount, num interestRate)
// Declarations
// num finalAmount
// finalAmount = (1 + interestRate/100) * initialAmount
// return finalAmount
my compiler says what i have is working so i assume it all works fine this way? as i said im a noob to c++
if possible could someone create the last steps and use // to explain them i do not understand how functions work exactly im reviewing my reading materials but nothings helping me here im lost right now.