Program TypeofCreditCard;
Var
AppliName: array[1..99] of String;
SSnum: array[1..99] of Integer;
GSal: array[1..99] of Integer;
TSalD: array[1..99] of Integer;
Name, CC : String;
Rep,Exp, GS,NS,Sum,TSD , YS,SSN,i, ,PofIncome : integer ;
YS, C_Amt: Real
Begin
Writeln ( 'Enter applicants who applied for a type of credit card');
Readln (Rep,Exp,GS,YS,NS,Sum,TSD,SSN,CC,PofIncome) ;
While ( Name <> ' Stop ' ) do
Begin
NS:= GS-TSD ;
Sum:= Exp + Rep ;
PofIncome:=(NS * 0.45);
Begin
If ( GS >4000) AND ( CC = 'Bronze Card' ) then
YS:= GS * 12 ;
C_Amt := YS * 0.25;
i:= i + 1;
AppliName [i]:= Name;
SSNum [i]:= SSN ;
GSal [i]:= GS ;
TSalD [i]:= TSD ;
End ;
Begin
If (GS >= 7500) AND (CC= 'Gold Card') then
YS:= GS * 12 ;
C_Amt:= YS * 0.3;
i:= i + 1 ;
AppliName [i]:= Name;
SSnum [i]:=SSN;
GSal [i]:=GS;
TSalD [i]:=TSD;
End;
Begin
If (GS>=10,000) AND ( CC = ' Platinum Card') then
YS := GS * 12;
C_Amt: = YS * 0.4;
i:= i + 1;
AppliName [i]:= Name;
SSNum [i]:= SSN;
GSal [i]:=GS;
TSalD [i]:= TSD;
End if
End if
End if
End While
End.
我正在使用免费的IDE Pascal,它说我有2个错误。如果有任何错误或您看到任何奇怪的信息,请通知我。错误说:致命:语法错误,“;”预期,但“标识符Writeln发现 - 错误来源 - Writeln('输入申请一种信用卡的申请人');
答案 0 :(得分:3)
;
后遗失了YS, C_Amt: Real
。此外,每个then
应该是begin
,而最后的所有End if
和End while
都应该是End;