new student

I keep getting a "unknown type name 'interest'" on my interest rate on line 9, along with a "unused variable 'Interest'" on line 25, I am still new to C++, any help would be appreciated .

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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
 //
//  Compound Interest.cpp
//  compound Interest
//
//  Created by Jacob Blazek on 1/27/14.
//
//

Interest Rate; 4.25%
Times Compounded: 12
Principal: $1000.00
Interest: $ 43.34
Amount in Savings: $1043.34 */
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;

int main()
{
double Principal, //The balance in the savings account
Rate, //The interest rate
T, //The number of times interest is compounded
//in a year
Interest,
Amount; //Amount of money in savings account
    
cout << setprecision(2) << fixed;
cout << "What is the principal, interest rate and number of times\n";
cout << "interest is compounded?" << endl;
cout << "Principal: $";
cin >> Principal;
cout << "Interest Rate: ";
cin >> Rate;
cout << "Number of times interest is compounded? ";
cin >> T;
    
    Amount = Principal*pow((1 +(Rate / T)),T);
    
    cout << "Amount in Savings: $" << Amount << endl;
    system("pause");
    return 0;
}

You are missing the start of a multiline comment on line 8 - just put /* on line 8.
Thank you on helping me fix a simple error
Topic archived. No new replies allowed.