Help I need help for this program?Am I doing the program correctly?

the bank offer two types of account saving and checking.Every customer must maintain a minimum balance.If a customer's balance falls below the minium balance, there is a service charge of 10 dollars for saving accounts and 25 dollars for checking account.If not then the saving account recieve 4 percent of interest and checking accounts with balnce up to 5000recieve 3 percent otherwise 5 percent.Write a prgorams that read a customer account number and account type , minimum balance that account should maintain and current balance and approaite message.Follow the data
46728 S 1000 2700
87324 C 1500 7689
79873 S 1000 800
89873 S 2000 3000
98322 C 1000 750


Am I doing it correctly?
# include <iostream>
# include <string>
# include <iomanip>
using namespace std;

int main ()
{ int accountNumber;
char accountType;
int savingFee;
int checkingFee;
int number=1000;
double Balance;
const double Saving_account_interest=0.04;
const double Checking_account_special=0.03;
const double Checking_account_regular=0.05;
const double Saving_account_fee=10;
const double Checking_account_fee=25;

cout<<fixed<<showpoint;
cout<<setprecision(2);
cout<<"Please input your account number"<<endl;
cin>>accountNumber;

cout<<endl;

cout<<"Enter account type:"
<< "S or s (Saving),"
<< "C or c (Checking),"<<endl;
cin>>accountType;
cout<<"Your balan"<<endl;


switch (accountType)
{
case 's':
case 'S':
cout <<"enter the number"<<endl;

if(number>=5000)
number=number*Saving_account_interest;
else (number<=5000);
number=number*Saving_account_interest+Saving_account_fee;


break;

case 'c':
case 'C':
number=1000;
if (number>5000)
number=number*Checking_account_special;
else (number<5000);
number=number*Checking_account_regular+Checking_account_fee;

break;
default:
cout<<"Invalid account type."<<endl;

std::cin.get();
return 0;
}
1. Use code tags
2. the switch statement is missing a closing brace
3. what do you intend to do with this? (same with case 'c':
1
2
3
4
5
cout <<"enter the number"<<endl;
if(number>=5000)
number=number*Saving_account_interest;
else (number<=5000);
number=number*Saving_account_interest+Saving_account_fee;


Topic archived. No new replies allowed.