#include<stdio.h>
int main()
{
while(1)
{
int a,b,c,d,password=1111,deposite,withdrawn,balance=3500;
printf(" 1= balance\n 2=deposite\n 3=withdrawn\n 4=exit\n");
printf("enter your password:\t");
scanf("%d",&password);
if(password==1111){
printf("enter your choice:\t");
scanf("%d",&a);
switch (a)
{
case 1:
printf("the balance is %d",balance);
break;
case 2:
printf("enter your deposite amount:\t");
scanf("%d",&deposite);
c=balance+deposite;
printf("your new balance is %d",c);
break;
case 3:
printf("enter your withdrawn ammount:\t");
scanf("%d",&withdrawn);
d=balance-withdrawn;
printf("your new balance is %d",d);
break;
default :
exit(0);
}
}
else
printf("you entered wrong number\n");
}
system("pause");
}
0 comments:
Post a Comment