if に従う場合、else を使用できない理由を説明できる人はいますか? エラーは期待される式を言っていますが、それが何を意味するのかわかりません
// 変数を整数として宣言 int account, depAmount, withAmount;
Account *Account1=[[Account alloc] init];
// Prompt user to input account number
NSLog(@"Please input your account number here: ");
scanf("%i", &account); // Accept user input
if (account==1000)
NSLog(@"How much do you want to deposit: ");
scanf("%i", &depAmount);
[Account1 setaccountNumber: account];
[Account1 setbegBalance: 900.50];
[Account1 addDeposit: depAmount];
NSLog(@"How much do you want to withdrawl: ");
scanf("%i", &withAmount);
[Account1 setnewbegBalance: 900.50 + depAmount];
[Account1 subtractWithdrawal: withAmount];
NSLog(@"Your account number is: %i\nBeginning balance: %f\nNew balance is: %f", [Account1 accountNumber], [Account1 begBalance], [Account1 newBalance]);
else if (account==2000)
NSLog(@"How much do you want to deposit: ");
scanf("%i", &depAmount);
[Account1 setaccountNumber: account];
[Account1 setbegBalance: 700.75];
[Account1 addDeposit: depAmount];
NSLog(@"Your account number is: %i\nBeginning balance: %f\nNew balance is: %f", [Account1 accountNumber], [Account1 begBalance], [Account1 newBalance]);
else if (account==3000)
NSLog(@"How much do you want to deposit: ");
scanf("%i", &depAmount);