Trying to write a program to calculate interest due. If the persons balance is below £1000 the interest is 2% if its over £1000 the interest is 5%. Need the program to output the interest paid and the account balance with the interest added. I have done this so far but kinda stuck on how to get it to work out 2% of the balance.
#include <iostream>
using namespace std;
int main()
int sum
int pct1
int pct2
{
int balance;
pct1 = ""
cout << "What is your account balance?\nBalance: ";
cin >> balance;
cout << endl;
}
{
if (balance <1000 )
Not working for some reason its saying "error: expected initializer before ')' token" No idea what this means.
#include <iostream>
using namespace std;
int main)_{
int accBalance = 0;//change keypoint name , initialize value are important
float interestPaid = 0;
float interestRate = 0;
float totalBalance = 0;