Question: There are something wrong in this coding..pls help me to correct it and explain the coding to..This is Bank Manangement System coding. # include <

There are something wrong in this coding..pls help me to correct it and explain the coding to..This is Bank Manangement System coding.

# include < stdio.h > # include < conio.h > void creation( ) ; void deposit( ) ; void withdraw( ) ; void lowbal( ) ; int a = 0 , i = 1001 ; struct bank { int no ; char name[20] ; float bal ; float dep ; } s[100]; int main( ) { int ch ; do { printf(" ********** ") ; printf(" BANKING ") ; printf(" ********** ") ; printf(" 1. Create New Account ") ; printf(" 2. Cash Deposit ") ; printf(" 3. Cash Withdraw ") ; printf(" 4. Low Balance Enquiry ") ; printf(" 5. Exit ") ; printf(" Enter your choice : ") ; scanf("%d ",& ch) ; switch ( ch) { case 1 : creation( ) ; break ; case 2 : deposit( ) ; break ; case 3 : withdraw( ) ; break ; case 4 : lowbal( ) ; break ; case 5 : ; break ; defalut : printf(" Choice a Valid option !! ") ; break ; getch( ) ; }} while( ch != 5 ) ; }

void creation( ) { printf(" ********** ") ; printf(" NEW ACCOUNT CREATION ") ; printf(" ********** ") ; printf(" Your Account Number is :%d ",i) ; s[a].no = i ; printf(" Enter your Name : ") ; scanf("%s ",& s[a].name) ; printf(" Your Deposit is Minimum Rs.500") ; s[a].dep=500 ;a++ ; i++ ; getch( ) ; } void deposit( ) { int no, b = 0, m = 0 ; int aa ; printf(" ********** ") ; printf(" CASH DEPOSIT ") ; printf(" ********** ") ; printf(" Enter your Account Number : ") ; scanf("%d ",& no) ; for ( b = 0 ; b < i ; b++) { if ( s[b].no == no) m = b ;} if ( s[m].no == no) { printf(" Account Number : %d ",s[m].no) ; printf(" Name : %s ",s[m].name) ; printf(" Deposit : %f ",s[m].dep) ; printf(" Deposited Amount : ") ; scanf("%f ",& &aa) ; s[m].dep+=aa ; printf(" The Balance in Account is : %f ",s[m].dep) ; getch( ) ; } else { printf(" ACCOUNT NUMBER IS INVALID ") ; getch( ) ; } } void withdraw( ) { int no, b = 0, m = 0 ; int aa ; printf(" ********** ") ; printf(" CASH WITHDRAW ") ; printf(" ********** ") ; printf(" Enter your Account Number : ") ; scanf("%d ",& no) ; for ( b = 0 ; b < i ; b++) { if ( s[b].no == no) m = b ;} if ( s[m].no == no) { printf(" Account Number : %d ",s[m].no) ; printf(" Name : %s ",s[m].name) ; printf(" Deposit : %f ",s[m].dep) ; printf(" Withdraw Amount : ") ; scanf("%f ",& aa) ; if ( s[m].dep < aa+500) { printf(" CANNOT WITHDRAW YOUR ACCOUNT HAS MINIMUM BALANCE ") ; getch( ) ; } else { s[m].dep-=aa ; printf(" The Balance Amount in Account is : %f ",s[m].dep) ; } } else { printf(" ACCOUNT NUMBER IS INVALID ") ; getch( ) ; } getch( ) ; } void lowbal( ) { int no, b = 0, m = 0 ; int aa ; printf(" ********** ") ; printf(" FOLLOWING ACCOUNT HOLDER'S BALANCE IS LESS THAN 1000 ") ; printf(" ********** ") ; for ( b = 0 ; b < a ; b++) { if ( s[b].dep < 1000)) { printf(" Account Number : %d ",s[b].no) ; printf(" Name : %s ",s[b].name) ; } } getch( ) ; }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!