[font=Comic Sans Ms][size=3]
CODE
#include<stdio.h>
int accbalance;
void main()
{
int empid;
printf("Welcome to the banking system\n");
printf("Enter employee Id\n");
scanf("%d",&empid);
if((empid==100) || (empid==200) || (empid==300))
printf("Welcome %d to the banking system",empid);
else
printf("the ID you enetered not correct\n");
struct customer
{
int cno;
char name[10];
char city [6];
int tel [10];
int ano;
int balance;
}cust;
struct operation
{
int withdraw;
int deposit;
}opr[2];
int i, int x;
for(i=0;i<3;i++)
{
printf("\nEnter customer details\n");
printf("\nEnter customer ID\n");
scanf("%d",&cust.cno);
getchar();
printf("Enter customer name\n");
gets(cust.name);
printf("\n\nEnter city\n");
gets(cust.city);
printf("\n\nEnter customer Telephone No.\n");
scanf("%d", &cust.tel);
printf("\n\nEnter account details\n");
printf("\n\nEnter account ID\n");
scanf("%d",&cust.ano);
printf("\n\n Enter balance\n");
scanf("%d", &cust.balance);
}
printf("\n\n Enter customer ID\n");
scanf("%d",&cust.cno);
int choice;
for(x=0;x<2;x++)
printf("\n these are your choices\n");
printf("%d%d",x+1, opr[x].withdraw );
printf("%d%d",x+1, opr[x].deposit);
printf("\n\n Enter your choice\n");
scanf("%d", &choice);
float with, dep;
switch (choice)
{
case 1:
printf("\n\n withdraw\n");
printf("\n\n how much u want to withdrwa\n");
scanf("%f", &with);
cust.balance=cust.balance-with;
accbalance-=with;
printf("%d", cust.balance);
break;
case 2:
printf("\n\n deposit\n");
printf("how much you wana deposit\n\n");
scanf("%f", &dep);
cust.balance=cust.balance+dep;
accbalance+=dep;
printf("%d", cust.balance);
break;
default:
printf("\n\n not correct\n");
break;
}