• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
projectsgeek

ProjectsGeek

Download Mini projects with Source Code, Java projects with Source Codes

  • Home
  • Java Projects
  • C++ Projects
  • VB Projects
  • PHP projects
  • .Net Projects
  • NodeJs Projects
  • Android Projects
    • Project Ideas
      • Final Year Project Ideas
      • JSP Projects
  • Assignment Codes
    • Fundamentals of Programming Language
    • Software Design Laboratory
    • Data Structure and Files Lab
    • Computer Graphics Lab
    • Object Oriented Programming Lab
    • Assembly Codes
  • School Projects
  • Forum

Banking project in c language source code

June 23, 2013 by ProjectsGeek 2 Comments

Banking  project in C Language

 

Statement : Develop a Banking  project in c language which will implement following features or functionality in the program .

 

  • Account Creation
  • Deposit Amount
  • Withdraw Amount
  • View Details
  • Foreign Exchange
  • Exit program

 


 #include<stdio.h>  
 #include<dos.h>  
 #include<conio.h>  
 #include<string.h>  
 #include<graphics.h>  
 #include<process.h>  
 struct bank // Bank Structure  
 {int accno;  
 char name[20];  
 float bal;  
 }b;  
 void main()  
 {int ch;  
 clrscr();  
 b:printf("\n\t\t\t\t Welcome to Aarthi Banking Corporation \n\n\n\t Please select your appropriate option...");  
 printf("\n 1. New customer \n 2. Existing customer \n 3. Exit");  
 scanf("%d",&ch);  
 switch (ch)  
 { case 1:  
      {FILE*ff;  
      ff=fopen("customer.dat","a");  
      clrscr();  
      printf("\n Welcome to Aarthi Banking Corporation (ABC.Ltd).\n It is a pleasure to have you here \n Please enter your name without spaces :");  
      scanf("%s",&b.name);  
      clrscr();  
      printf("\n Welcome %s, please enter a suitable account number",b.name);  
      scanf("%d",&b.accno);  
      printf("\n Please mention the initial deposit... Rs: ");  
      scanf("%f",&b.bal);  
      printf("\n Congratulations... Your account has been created.\nTo deposit please login as existing customer");  
      fwrite(&b,sizeof(b),1,ff);  
      fclose(ff);  
      getch();  
      clrscr();  
      goto b;  
      }break;  
 case 2:  
      {     int num,count=0,n,ch,flag;  
  int a,c,t;  
  float amount,value,temp;  
  FILE *fp;  
   clrscr();  
   printf("\n Welcome once again to Aarthi Banking Corporation (ABC)... ");  
   printf("\n\n Please Enter your Account Number");  
   scanf("%d",&num);  
   fp=fopen("customer.dat","r+");  
   rewind(fp);  
   while(!feof(fp)&&count==0)  
  { fread(&b,sizeof(b),1,fp);  
   if (b.accno==num)  
   {  count=1;  }   }  
   if(count==0)  
   {     printf("\n Wrong account number... No such user");  
   getch();  
   goto b;  }  
  else  
   { int m;  
   clrscr();  
   printf("\n Welcome %s, What service would you like to avail",b.name);  
   printf("\n 1. Deposit Amount ");  
   printf("\n 2. Withdraw Amount ");  
   printf("\n 3. View Details ");  
   printf("\n 4. Foreign Exchange");  
   printf("\n 5. Exit program");  
   printf("\n Please Enter your choice : ");  
   scanf ("%d",&m);  
   switch(m)  
   {case 1:  
   {clrscr();  
    printf("\n\n\n Dear %s, please enter the amount you wish to deposit : ",b.name);  
    scanf("%f",& amount);  
    b.bal=b.bal+amount;  
    printf("\n Your current available bank balance is %f", b.bal);  
    n=sizeof(b);  
    fseek(fp,-n,SEEK_CUR);  
    fwrite(&b,n,1,fp);  
    fclose(fp);  
    getch();  
    }break;  
    case 2:  
   {clrscr();  
    printf("\n\n\n Dear %s, please enter the amount you wish to withdraw : ",b.name);  
    scanf("%f",& amount);  
    if(b.bal-amount<=0)  
    {printf("\n Sorry, You dont have enough money in your account");  
    fclose(fp);  
    getch();  
    goto b;  
    }  
    else  
    {b.bal=b.bal-amount;  
    printf("\n Your current available bank balance is %f", b.bal);  
    getch();  
    n=sizeof(b);  
    fseek(fp,-n,SEEK_CUR);  
    fwrite(&b,n,1,fp);  
    fclose(fp);  
    goto b;  
    }  
    }break;  
    case 3:  
    { clrscr();  
    printf("\n Your Account Details are as folows...");  
    printf("\n\n Name : %s",b.name);  
    printf("\n\n Account Number : %d ",b.accno);  
    printf("\n\n Available Balance :%f ",b.bal);  
    fclose(fp);  
    printf("\n Press any key to continue...");  
    getch();   clrscr();  
    goto b;  
    }break;  
    case 4:  
    {int x;  
    float y,z;  
    clrscr();  
    printf("\n Welcome to the foreign exchange convertor section \n Select the currency you wish to convert.");  
    printf("\n 1. US Dollar");  
    printf("\n 2. Euro");  
    printf("\n 3. Pound");  
    scanf("%d",&x);  
    switch(x)  
    {  
    case 1:  
    {   printf("\n Please enter the amount of rupees you wish to convert");  
    scanf("%f",&y);  
    z=45/y;  
    printf("\n The converted rate is $ %f",z);  
    getch();  
    goto b;  
    }break;  
    case 2:  
    {   printf("\n Please enter the amount of rupees you wish to convert");  
    scanf("%f",&y);  
    z=75/y;  
    printf("\n The converted rate is euro %f",z);  
    getch();  
    goto b;  
    }break;  
    case 3:  
    {printf("\n Please enter the amount of rupees you wish to convert");  
    scanf("%f",&y);  
    z=60/y;  
    printf("\n The converted rate is pound %f",z);  
    getch();  
    goto b;  
    }break;  
    default:  
    exit(0);  
   }  }break;}}}}}

 

Other Projects to Try:

  1. How to Implement Hash Table using C language
  2. Sparse Matrix Operations Code using C Langauge
  3. Single Link List code using C Language
  4. Matrix operations in c language
  5. Banking Management System Project in Visual Basic with Source Code

Filed Under: C Assignments

Reader Interactions

Comments

  1. TYAGRAJ BHATT says

    January 11, 2016 at 5:30 pm

    Good , very nice coding very useful to me….

    Reply
    • ProjectsGeek says

      January 16, 2016 at 10:15 pm

      Thanks

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Tags

.Net Projects Download Android Project Ideas Android Projects Angular 2 Assembly Codes C # Projects C & C++ Projects C++ Projects Class Diagrams Computer Graphics Database Project Data Mining Projects DataScience Projects Datastructure Assignments Download Visual Basic Projects Electronics project Hadoop Projects Installation Guides Internet of Things Project IOS Projects Java Java Interview Questions Java Projects JavaScript JavaScript Projects java tutorial JSON JSP Projects Mechanical Projects Mongodb Networking Projects Node JS Projects OS Problems php Projects Placement Papers Project Ideas Python Projects seminar and presentation Struts

Search this Website


Footer

Download Java Project
Download Visual Basic Projects
Download .Net Projects
Download VB Projects
Download C++ Projects
Download NodeJs Projects
Download School Projects
Download School Projects
Ask Questions - Forum
Latest Projects Ideas
Assembly Codes
Datastructure Assignments
Computer Graphics Lab
Operating system Lab
australia-and-India-flag
  • Home
  • About me
  • Contact Form
  • Submit Your Work
  • Site Map
  • Privacy Policy