please help me figure this out ;/

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <cstdlib>
#include <iostream>

using namespace 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++
Last edited on
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.
Topic archived. No new replies allowed.