main()
{
int accno[10],amt[10],de,cr;
int i=1,j,z;
aa:
clrscr();
printf("\n 1. add record...");
printf("\n 2. debit..");
printf("\n 3.credit...");
printf("\n 4.disply..");
printf("\n 5.exit..");
printf("\n enter your choice number ....\n");
scanf("%d",&z);
switch(z)
{
case 1:
{
printf("enter accno & opening amount.....\n");
scanf("%d %d",&accno[i],&amt[i]);
i=i+1;
}
getch();
goto aa;
case 2:
printf("Enter the Accno & debit amount...\n");
scanf("%d %d",&accno,&de);
amt[j]=amt[j]+de;
getch();
goto aa;
case 3:
printf("\nEnter the Accno & credit amount..\n");
scanf("%d %d",&accno,&cr);
amt[j]=amt[j]-cr;
printf("%d",amt[j]);
getch();
goto aa;
case 4:
clrscr();
printf("Accno & Amount....\n");
printf("====================");
for(j=1;j{
printf("\n%d %d",accno[j],amt[j]);
}
getch();
goto aa;
case 5:
break;
}
}
{
int accno[10],amt[10],de,cr;
int i=1,j,z;
aa:
clrscr();
printf("\n 1. add record...");
printf("\n 2. debit..");
printf("\n 3.credit...");
printf("\n 4.disply..");
printf("\n 5.exit..");
printf("\n enter your choice number ....\n");
scanf("%d",&z);
switch(z)
{
case 1:
{
printf("enter accno & opening amount.....\n");
scanf("%d %d",&accno[i],&amt[i]);
i=i+1;
}
getch();
goto aa;
case 2:
printf("Enter the Accno & debit amount...\n");
scanf("%d %d",&accno,&de);
amt[j]=amt[j]+de;
getch();
goto aa;
case 3:
printf("\nEnter the Accno & credit amount..\n");
scanf("%d %d",&accno,&cr);
amt[j]=amt[j]-cr;
printf("%d",amt[j]);
getch();
goto aa;
case 4:
clrscr();
printf("Accno & Amount....\n");
printf("====================");
for(j=1;j{
printf("\n%d %d",accno[j],amt[j]);
}
getch();
goto aa;
case 5:
break;
}
}
No comments:
Post a Comment