在函数主体()中得到“语句缺失”,即使我已经在C++中使用分号

在函数主体()中得到“语句缺失”,即使我已经在C++中使用分号,c++,C++,这是代码分配 A bank charges $10 per month plus the following check fees for a commercial checking account: $0.10 each for fewer than 20 checks $0.08 each for 20-39 checks $0.06 each for 40-59 checks $0.04 each for 60 or more checks The bank also charges a

这是代码分配

A bank charges $10 per month plus the following check fees for a commercial checking account:

$0.10 each for fewer than 20 checks
$0.08 each for 20-39 checks
$0.06 each for 40-59 checks
$0.04 each for 60 or more checks
The bank also charges an extra $15.00 if the balance of the account falls below $400 (before any check fees are applied). Write a program named lab2 that inputs for the beginning balance and the number of check written from the transaction file. Compute and display the bank's service fees for the month.

Input Validation: Do not accept a negative value for the number of checks written. If a negative value is given for the beginning balance, display an urgent message indicating the account is overdrawn. 
The program should have a loop execution of six times for reading data from a file named  transaction.txt.
Click the link transaction.txt download the file and store it in  folder c:\cis180\lab2. The file transaction.txt contains the beginning balance and number of checks written for six transactions. 
Here is the content of the file.
文本文件

-100.00 -beginningbalance
30  - number of checks
400.00
-20
300.00
36
300.00
47
350.00
5
300.00
70
我的代码

#include <iostream>
#include <fstream>
#include <string>
#include <stdlib.h>
#include <sstream>
//include a library file to input data from file
using namespace std;
bool isNumeric(string pszInput);
int main()
{//start

// Constants

int numChecks; // Number of checks written for the month
double acctBalance; // Account balance before subtracting check fees
double checkFee; // Fee based on number of checks written
double totalFees; // Total monthly bank fees

ifstream inputFile;
//Open the file
inputFile.open("c:\\cis180\\transaction.txt"); 
//Initialize month counter
int transaction = 0; //first month

//Create a loop to execute 6 times. Each time the loop body reads the beginning balance and number of checks for six transaction, calculate the bank fees, display the beginning balance, number of checks, and the bank fees.
inputFile >> acctBalance;

// Display the beginning balance 
   if (acctBalance>0)
   {
   cout<<"Your beginning balance is: "acctBalance << endl; 
   }
   else (acctBalance<0)
   {
   cout<<"Your account is overdrawn!" << endl; 
   } 

// Display the number of checks that were written.
   if (numChecks>0)
   {
   cout<<"The number of checks written were: "numChecks<<endl;
   }
   else (numChecks<0)
   {
   cout<<"Number of checks must be 0 or more."<<endl; 
   }


// Determine whether the account is overdrawn.

// Validate number of checks written.

// If the number of checks is less than 0

{ // numChecks is valid, so we can calulate the fees.
// Calculate checkFee - Use if/else if structure
const double MONTHLY_FEE= 10.00; // Base monthly fee
const double MIN_BAL= 400.00; // minimum balance
const double LOW_BAL_FEE= 15.00; // extra fee for low balance
for (int transaction = 0; transaction <=6; transaction++);


   if (numChecks<20)
   {
   checkFee=(0.1*numChecks)+MONTHLY_FEE<<endl;
   }
   else if (numChecks<40 )
   {
   checkFee=( 0.08*numChecks)+MONTHLY_FEE<<endl;
   }
   else if (numChecks<60 )
   {
   checkFee=( 0.06*numChecks)+MONTHLY_FEE<<endl;
   }
   else (numChecks>60 )
   {
   checkFee=( 0.04*numChecks)+MONTHLY_FEE<<endl;
   }



// Calculate totalFees
   if (numChecks<20 && acctBalance<MIN_BAL)
   {
   totalFees=checkFee+LOW_BAL_FEE<<endl;
   }
   else if (numChecks<40 && acctBalance<MIN_BAL)
   {
   totalFees=checkFee+LOW_BAL_FEE<<endl;
   }
   else if (numChecks<60 && acctBalance<MIN_BAL)
   {
   totalFees=checkFee+LOW_BAL_FEE<<endl;
   }
   else if (numChecks>60 && acctBalance<MIN_BAL)
   {
   totalFees=checkFee+LOW_BAL_FEE<<endl;
   }
   else (numChecks<20 && acctBalance>MIN_BAL)
   { 
   totalFees=checkFee
   }


// Display results: The bank fee

cout<<"The bank fee this month is "<<totalFees<<endl;

}//end  the  loop


return 0;
}//end

所以基本上我唯一的问题就是标题。有人能帮忙吗?我也是新的C++语言,所以请温柔些。如果还有其他问题,你能告诉我吗?提前谢谢。

您忘了这里的操作员

cout << "Your beginning balance is: " << acctBalance << endl;
                                      ^^

使用一致的缩进样式也可以提高可读性。

您可能会有很多错误,这里已经提到了另一个错误:totalFees=checkFee需要尾随分号:totalFees=checkFee;int事务中的分号=0;但现在我有另一个问题,输出不正确。这是另一个新问题。不要让你的问题表现得像一只变色龙。
cout << "Your beginning balance is: " << acctBalance << endl;
                                      ^^
cout << "The number of checks written were: " << numChecks << endl;
                                              ^^
if(numChecks < 20) {

}