I keep getting an error telling me:
Error E2379 new.c 39: Statement Missing ; in function main *** 1 Errors in compile ***
Anyways here is the code, please help me find it
#include <stdio.h>
#define Balance 100
#define pinnumber 2006
int main(void)
{
int pin;
int depo;
int wdrl;
int balance;
int transtype;
int deposit;
int withdrawl;
printf("Please enter your pin number");
scanf("%d", &pin);
if (pin == pinnumber){
printf("\n You have entered a correct pin");
printf("\n Your current balance is %d", Balance);
printf("\n Please choose a transaction type: \n");
printf("\n1.Deposit \n2.Withdrawl \n3.Transfer \n");
scanf("%d", &transtype);
if (transtype == 1)
{
printf("\n Please enter how much you would like to deposit: ");
scanf("%d", &depo);
deposit = Balance + depo;
printf("\n Your new balance is = %d", deposit);
}
else if (transtype == 2)
{
printf("How much would you like to withdraw:");
scanf("%d", &wdrl);
if (wdrl > Balance)
{
printf("You cannot withdraw more than your current balance");
}
else
}
withdrawl = Balance - wdrl;
printf("\n Your new balance is = %d", withdrawl);
}
}
return 0;
}
Error E2379 new.c 39: Statement Missing ; in function main *** 1 Errors in compile ***
Anyways here is the code, please help me find it
#include <stdio.h>
#define Balance 100
#define pinnumber 2006
int main(void)
{
int pin;
int depo;
int wdrl;
int balance;
int transtype;
int deposit;
int withdrawl;
printf("Please enter your pin number");
scanf("%d", &pin);
if (pin == pinnumber){
printf("\n You have entered a correct pin");
printf("\n Your current balance is %d", Balance);
printf("\n Please choose a transaction type: \n");
printf("\n1.Deposit \n2.Withdrawl \n3.Transfer \n");
scanf("%d", &transtype);
if (transtype == 1)
{
printf("\n Please enter how much you would like to deposit: ");
scanf("%d", &depo);
deposit = Balance + depo;
printf("\n Your new balance is = %d", deposit);
}
else if (transtype == 2)
{
printf("How much would you like to withdraw:");
scanf("%d", &wdrl);
if (wdrl > Balance)
{
printf("You cannot withdraw more than your current balance");
}
else
}
withdrawl = Balance - wdrl;
printf("\n Your new balance is = %d", withdrawl);
}
}
return 0;
}