C语言程序设计--银行管理系统

 

 

#include <stdio.h>

#include <malloc.h>

#include <conio.h>

#include <time.h>

#include <windows.h>

_ICONHAND            //错误

struct account_information          //账号信息

{

       char account[8];              //账号   7

       char password[9];           //密码   8

       long balance;                   //余额  9

       char name[8];                  //姓名

       char id[19];                      //身份证号码

       char telephone[12];        //电话号码

       char danwei[25];             //单位

       char address[25];            //地址

       struct account_information *next;

}acix={"cy20184","12345678",0,"陈颖","430423200110282524","15697342903","湖南工院","湖南长沙",NULL};

struct pawd

{

       char account[8];

       char password[9];   

}mima;

//***************************************************************************   //全局变量

static int count=0;

char ch;

struct account_information *head,*ptr;

//***************************************************************************

int shouye();                                                                      //主界面             胡文完成

int denglu();                                                                      //登陆函数

int zhuce();                                                                       //注册函数

int yzmima();                                                                     //验证密码

int retpwd();                                                                      //找回密码

int dengluyz(char account[7],char password[8]);         //登陆验证

int bcdlb();                                                                 //保存到链表

int index();                                                                  //副界面             胡文完成

int xiaohu();                                                                //销户                 赵诗雅完成

int cunkuan();                                                                    //存款                 赵诗雅完成

int qukuan();                                                                     //取款                 赵诗雅完成

int zhuanzhang();                                                             //转账                 赵诗雅完成

int chaxun();                                                                      //查看

int xiugai();                                                                 //修改信息

int print(int floag);                                                    //输入其它信息

int readfile();                                                                     //读取文件

int writefile();                                                              //写入文件

int guodu();                                                                //登录时的过渡

//**************************************************************************

void main()                                                 //主函数

{

       bcdlb();

       readfile();                                               //默认有一个账户

       shouye();                                                //调用首页函数

       writefile();

}

//***************************************************************************

int shouye()               //主界面

{

       int i,j=0;

       system("title 银行用户管理系统");            //设置窗口的标题

       printf("\n     ****************中国银行用户管理系统***************\n");

       printf("\n\t┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\n");

       printf("\t\t        \t\t\t  \t\n");

       printf("\t\t1.登陆账户");

       printf("\t\t2.注册账户\t\n");

       printf("\t\t        \t\t\t  \t\n");

       printf("\t\t3.找回密码");

       printf("\t\t4.退出系统\t\n");

       printf("\t\t        \t\t\t  \t\n");

       printf("\t┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\n");

       printf("\n请输入您要选择的操作:");

       scanf("%d",&i);

       system("cls");

       switch(i)

       {

              case 1: denglu(); break;                //调用登陆函数

              case 2: zhuce(); break;                         //调用注册函数

              case 3: retpwd(); break;                //调用找回密码函数

              default :{if(MessageBox(NULL,"确认退出?","通知",1)==1) return 0;}

       }

       system("cls");             //清屏函数

       shouye();                    //自己调用自己

       return 0;

}

//***************************************************************************

int denglu()        //登录函数

{

    int i,floag;

    char account[7],ch;

    system("title 登录");                     //设置运行窗口的标题

   puts("\n注意:1.账号为7位的字母或数字\n");

   puts("      2.密码为8位的字母或数字\n");              

    printf("\n");

   printf("\t\t********登 陆********\n");

   printf("\t\t账号:");

   for(i=0;i<7;i++)

   {

           ch=getch();

           if(ch=='\b')

           {

                  printf("\b \b");

                  if(i-1<0)

                  {

                         i--;

                  }

                  else i=i-2;

           }

           else

           {

                  putchar(ch);

                  account[i]=ch;

           }

   }

   account[7]=0;

   printf("\n\t\t密码:");

    for(i=0;i<8;i++)

           {

                  ch=getch();

                  if(ch=='\b')

                  {

                         printf("\b \b");

                         if(i-1<0)

                         {

                                i--;

                         }

                         else i=i-2;

                  }

                  else

资料借鉴于此纷传

  • 18
    点赞
  • 17
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

白茶丫

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值