当前位置:首页 » 编程语言 » 模拟银行c语言课程设计
扩展阅读
webinf下怎么引入js 2023-08-31 21:54:13
堡垒机怎么打开web 2023-08-31 21:54:11

模拟银行c语言课程设计

发布时间: 2022-07-11 12:55:39

❶ 用c语言写一个银行AMT模拟系统

没有分呀 开玩笑呢吧
没人给你做的 至少要求100分

❷ c语言 设计一个银行管理系统

功能:能够输入和查询客户存款取款记录。在客户文件中,每个客户是一条记录,包括编号、客户姓名、支取密码、客户地址、客户电话、账户总金额;在存取款文件中,每次存取款是一条记录,包括编号、日期、类别、存取数目、经办人。类别分为取款和存款两种。本系统能够输入客户存款或取款记录;根据客户姓名查询存款和取款记录。分步实施:1、初步完成总体设计,搭好框架,确定人机对话界面,确定函数个数;2、建立一个文件,输入客户的必要信息,能对文件进行显示、输入、修订、删除等。3、进一步要求:完成客户姓名查询存款和取款记录,并能得到每次帐户总金额。要求:1、用C语言实现系统;2、利用结构体数组实现信息的数据结构设计;3、系统的各个功能模块要求用函数的形式实现;4、界面友好(良好的人机交互),程序加必要的注释。课程设计实验报告要求:1、预习报告:题目、课程设计任务、数据结构、程序的总体设计(算法)、模块划分 。2、实验总结报告:流程图、主要源程序代码(需打印)、测试情况及调试中问题与解决方案、小结等要求:标明所用函数的用途和目的,简单叙述制作思路。
是否可以解决您的问题?

❸ 数据结构C语言——银行排队模拟

这个主要是队列的应用哦。先到先入队。后到后出。之前写过。 这里有

❹ C语言课程设计银行管理小系统

我这有个个人收支管理系统,你看看是否用得上。
#include<stdio.h>
#include<string.h>
#define N 100
struct money
{
int shunxu;
int year;
int month;
int day;
char zhaiyao[50];
float jine;
float yue;
char bizhong[10];
int biao;

}in[N],out[N],temp[N],*pp,*qq;
void shouru(int x)
{

int i;
char ch;
system("cls");
if(x==1)
pp=in;
else
pp=out;
for(i=1;i<N;i++,pp++)
{
pp->shunxu=i;
pp->biao=x;
printf("\n日期(年 月 日)\t摘要\t金额\t币种\n");
scanf("%d%d%d%s%f%s",&pp->year,&pp->month,&pp->day,pp->zhaiyao,&pp->jine, pp->bizhong );
printf("是否继续输入?1 是 2 否\n");
scanf("%s",&ch);
if(ch=='1')
continue;
else if(ch=='2')
break;
else
{

printf("error!");
system("pause");
break;
}

}
printf("是否保存:1是 2否\n");
scanf("%d",&i);
switch(i)
{
case 1:
if(x==1)
{
xieru(1);
break;
}
else
{
xieru(-1);
break;
}
case 2:
system("pause");
break;
default:
break;
}

}
mingxi()
{
FILE *f;
int y,m,d,y2,m2,d2;
int i;
system("cls");
pp=temp;
if((f=fopen("ff.txt","rt"))==NULL)
{
printf("文件打开错误!");
system("pause");
}
for(i=0;i<N;i++,pp++)
fscanf(f,"%d\t%d年%d月%d日\t%s\t%f\t%f\t%s\t%d\n",&pp->shunxu,&pp->year,&pp->month,&pp->day,pp->zhaiyao,&pp->jine,&pp->yue,pp->bizhong,&pp->biao);
pp=temp;
/*for(;pp->shunxu!=0;pp++)
printf("%d %s %f\n",pp->shunxu,pp->bizhong,pp->jine);*/
printf("输入起止时间(年 月 日):\n");
scanf("%d%d%d%d%d%d",&y,&m,&d,&y2,&m2,&d2);
for(;pp->shunxu!=0;pp++)
{
if(pp->year>=y||pp->month>=m||pp->day>=d)
{

for(;pp->shunxu!=0;pp++)
{

if(pp->year>y2||pp->month>m2||pp->day>d2)
break;
printf("%d年%d月%d日\t%f\n",pp->year,pp->month,pp->day,pp->jine);
}
}

}

system("pause");

}
chaxun()
{
system("cls");
printf("建设中。。。");
system("pause");
}
xieru(int x)
{
FILE *f;
system("cls");
pp=in;
qq=out;
f=fopen("ff.txt","at+");
if(f==NULL)
{
printf("文件打开错误!");
system("pause");
}
if(x==1)
for(;pp->shunxu !=0;pp++)
{
fprintf(f,"%d\t%d年%d月%d日\t%s\t%f\t%f\t%s\t%d\n",pp->shunxu,pp->year,pp->month,pp->day,pp->zhaiyao,pp->jine,pp->yue,pp->bizhong,pp->biao);

}
else if(x==-1)
for(;qq->shunxu!=0;qq++)
{
fprintf(f,"%d\t%d年%d月%d日\t%s\t%f\t%f\t%s\t%d\n",qq->shunxu,qq->year,qq->month,qq->day,qq->zhaiyao,qq->jine,qq->yue,qq->bizhong,qq->biao);
}
else
{
for(;pp->shunxu !=0;pp++)
{
fprintf(f,"%d\t%d年%d月%d日\t%s\t%f\t%f\t%s\t%d\n",pp->shunxu,pp->year,pp->month,pp->day,pp->zhaiyao,pp->jine,pp->yue,pp->bizhong,pp->biao);

}
for(;qq->shunxu!=0;qq++)
{
fprintf(f,"%d\t%d年%d月%d日\t%s\t%f\t%f\t%s\t%d\n",qq->shunxu,qq->year,qq->month,qq->day,qq->zhaiyao,qq->jine,qq->yue,qq->bizhong,qq->biao);
}
}

fclose(f);
printf("保存成功!");
system("pause");
}
qu()
{
FILE *f;
char ch;
system("cls");

f=fopen("ff.txt","rb");
if(f==NULL)
{
printf("文件打开错误!");
system("pause");
}
ch=fgetc(f);
while(ch!=EOF)
{
putchar(ch);
ch=fgetc(f);
}
fclose(f);
system("pause");
}

void main()
{
int i=1,a;
for(;i!=0;)
{
system("cls");
printf("个人收支管理\n");
printf("1.收入\n2.支出\n3.明细表\n4.查询与统计\n5.写入文件\n6.读取文件\n0.退出\n");
scanf("%d",&a);
switch(a)
{
case 1:
shouru(1);
break;
case 2:
shouru(-1);
break;
case 3:
mingxi();
break;
case 4:
chaxun();
break;
case 5:
xieru(0);
break;
case 6:
qu();
break;
case 0:
i=0;
break;

}

}

}

❺ 数据结构:银行业务模拟的C语言程序

像这样的要求嘛,来网络就错了,你得上专业网站找高手。还急需的话,就不要继续在这儿浪费时间了

❻ 编写一个C语言程序模拟银行ATM机的账户管理功能,系统主要实现以下功能

按照你的愿意把空都填好了,VC++ 6.0下编译能通过,有警告信息,运行基本上能用,不过个人认为这个系统有很大的不足,比如输入账号的时候没有输出反馈信息,以及没有对误操作的处理等等。需要的话可以帮你改改!

#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
#include <string.h>
#define AN 9 //表示账号8位
#define PN 7 //表示密码6位
#define ASN 3 //表示系统中共有3个账户信息
struct Account
{
char accountnumber[AN]; //表示账号信息
char password[PN]; //表示账户的密码信息
double balance; //表示账户的余额
};
struct Account ats[ASN]={{"00000001","123456",100},{"00000002","123456",200},{"00000003","123456",300}};
//ats数组用于存储系统中三个账户的信息
int isCorrect(char *an,char *psd)
{
int i;
for(i=0;i<ASN;i++)
if(strcmp(ats[i].accountnumber,an)==0 && strcmp(psd,ats[i].password)==0)
return 1;
return 0;
}
double getBalance(char *an)
{
int i;
for(i=0;i<ASN;i++)
if(strcmp(an,ats[i].accountnumber)==0)
return ats[i].balance;
}

void deposit(char *an,int amount)
{
int i;
for(i=0;i<ASN;i++)
if(strcmp(an,ats[i].accountnumber)==0)
ats[i].balance+=amount;
}
int withdraw(char *an,int amount)
{
int i;
for(i=0;i<ASN;i++)
if(strcmp(an,ats[i].accountnumber)==0)
return ats[i].balance-=amount;
}

void main()
{
char AccountNumber[AN]={'\0'};
char psd[PN]={'\0'};
int i,errorcount=0;
while(1)
{
printf("\n请输入8位账号:");
for(i=0;i<8;i++)
AccountNumber[i]=getch();
printf("\n请输入6为密码:");
for(i=0;i<6;i++)
{
psd[i]=getch();
putchar('*');
}
if(isCorrect(AccountNumber,psd)==1)
{
int tag,amount;
while(1)
{
printf("\n欢迎登录银行账户管理系统,请选择您要的服务:1、查询余额;2、存款操作;3、取款操作;4、退出系统\n");
scanf("%d",&tag);
switch(tag)
{
case 1:
printf("您现在的余额为%f元\n",getBalance(AccountNumber));
break;
case 2:
printf("请输入您的存款金额:");
scanf("%d",&amount);
deposit(AccountNumber,amount);
printf("存款成功!您的当前余额为:%f元\n",getBalance(AccountNumber));
break;
case 3:
printf("请输入您的取款金额:");
scanf("%d",&amount);
if(amount<=getBalance(AccountNumber))
printf("取款成功!您的当前余额为:%f元\n",withdraw(AccountNumber,amount));
else
printf("取款失败!\n");
break;
case 4:
break;
}
if(tag==4)
break;
}

}
else
{
errorcount++;
if(errorcount==3)
{
printf("您已经连续三次输入错误,系统将自动关闭\n");
break;
}
}
}
}

❼ C语言设计银行账户模拟程序

能传附件吗?不知道怎么传。我就贴给你吧。
#include<iostream>
#include<string>
#include<fstream>
using namespace std;

class account //atm账户类
{
private:
string CardNum,Psw; //卡号、密码
float Balance;
public:
friend class ATM; //atm为友元
/*void get_cardnum();
void get_psw();
void get_balance();*/
account(){}//<---------------------here
account(string num,string passwd,float balance); //构造函数
void Write();
};

class ATM //atm机类
{
private:
int times;
account *ac;
public:
ATM(); void load( account *act ); //装入账户信息
void welcome(); //初始欢迎信息
bool check_passwd( string pwd ); //验证当前账户信息的密码
void change_psw(); //修改密码
void get_money(); //取钱
float check_balance(); //查账
void tran(); //转账
void exit(); //退卡
void function_show(); //显示功能菜单
void lock(); //锁定账户
};

/*
* account::account( string num, string passwd, float balance )
* account类构造函数
* 用途: 使用给定的账号密码等信息初始化一个account对象
* 参数: string num 账号
* string passwd 密码
* float balance
*/
account::account( string num, string passwd, float balance )
{
CardNum = num;
Psw = passwd;
Balance = balance;
}
//atm类构造函数
/*account::get_cardnum()
{
return CardNum;
}
account::get_psw()
{
return Psw;
}
account::get_balance()
{
return Balance;
}*/
void account::Write()
{
ofstream outfile("atm.txt",ios::binary);//<-----------------here
outfile.write((char *)(this),sizeof(account));//<-------------here
outfile.close();
}

ATM::ATM()
{
}

/*
* void ATM::load( account *act )
* ATM类装入账户信息函数
* 用途: 载入指定的account对象,模拟atm插卡过程
* 参数: account *act 要载入的account对象指针
*/
void ATM::load( account *act )
{
ac = act;
}

/*
* void ATM::welcome()
* ATM类显示初始欢迎信息函数
* 用途: 显示欢迎信息,提示密码输入并验证
* 参数: 无
*
*/
void ATM::welcome()
{
times = 0; //记录密码输入错误次数
cout << "Welcome to use the China Bank ATM!" << endl;
string pwd; //这一个语句应该上移的,一般来说数据的定义和初始化一块写在开头,下面才是各种操作的语句
while( times < 3 )
{
cout << "Please enter the password: " << endl;
cin >> pwd;
if( !check_passwd( pwd ) )
{
cout << "The password you entered is wrong, please enter again" << endl;
times++;
}
else
{
function_show();
break;
}
}
if( times >= 3 )
lock(); //输入密码错误次数超过(等于)3次,锁定账户
}

bool ATM::check_passwd( string pwd )
{
if( pwd == ac->Psw )
return true;
else
return false;
}

void ATM::function_show()
{
int n;
cout << "(1) Change Password" << endl;
cout << "(2) Get Money" << endl;
cout << "(3) Check Balance" << endl;
cout << "(4) Transfer accounts" << endl;
cout << "(5) Exit" << endl;
cin >> n;
while(n != 1 && n != 2 && n != 3 && n != 4 && n != 5) //这样就可以完全限制用户的输入
{
cout << "Please enter the right number" << endl;
cin >> n;
}
switch( n )
{
case 1:
change_psw();
break;
case 2:
get_money();
break;
case 3:
cout << check_balance() << endl;
break;
case 4:
tran();
break;
case 5:
exit();
break;

}
}

void ATM::lock()
{
cout << "Sorry! Your card has been confiscated!" << endl;
exit();
}

void ATM::change_psw()
{
string old_psw, new_psw1, new_psw2;
int t = 0 ;
while( t < 3 )
{
cout << "Please enter the old password: ";
cin >> old_psw;
if( !check_passwd( old_psw ) )
{
cout << "The password you enter is wrong, please enter again" << endl;
t++;
}
else
{
cout << "Please enter the new password: ";
cin >> new_psw1;
cout << "Please enter the new password again: ";
cin >> new_psw2;
if( new_psw1 == new_psw2 )
{
ac -> Psw = new_psw2;
cout << "You have change your password successfully!" << endl;
break;
}
else
cout << "Sorry, entered passwords do not match! " << endl;
}
}
//}//<----------------------here
if( t >= 3 )
{
cout << "Sorry, you have inputed the wrong password for three times and more! " << endl;
}
}

void ATM::get_money()
{
float money;
cout << "Please enter the amount of money you want to get: " <<endl;
cin >> money;
while( money > ac -> Balance)
{
cout << "Your balance is not enough, please enter again" << endl;
cin >> money;
}
ac -> Balance = ac -> Balance - money;
}

float ATM::check_balance()
{
return ac -> Balance;
}

void ATM::tran()
{
account a[5];
string cn;
float m;
cout<<"please enter the cardnum of the account you want to transfer money to"<<endl;
cin>>cn;
ifstream infile("atm.txt",ios::binary);
infile.seekg(0,ios::beg);
for(int i=0;i<5;i++)
{
infile.read((char *)(&a[i]),sizeof(a[i]));
}
for(int j=0;j<5;j++)
{
if(cn==a[i].CardNum)
{
cout<<"please enter the amount of money"<<endl;
cin>>m;
while(m>ac->Balance)
{
cout<<"there is no enough money in your account,please enter again"<<endl;
cin>>m;
}
ac->Balance=ac->Balance-m;
a[i].Balance=a[i].Balance+m;
ofstream outfile("atm.txt",ios::binary);
outfile.seekp(i*sizeof(a[0]),ios::beg);
outfile.write((char *) &a[i],sizeof(a[i]));
}
}
if(j>=5)
{
cout<<"the account doesn't exit"<<endl;
}
}

void ATM::exit()
{
cout << "Please take your card!" << endl;
}

int main()
{
account a[5]={account("10001","1111",5000.0f),account("10002","2222",10000.0f),account("10003","3333",15000.0f),
account("10004","4444",20000.0f),account("10005","5555",25000.0f)};
account temp( "10001", "1111", 5000.0f );
ATM atm;
atm.load( &temp );
atm.welcome();
return 0;
}

❽ 急求c语言银行储蓄系统课程设计!!!

阿滕宏伟斯图尔特我个人过

❾ C语言用队列结构模拟,银行业务排队系统实现 1.有储户要办理存取款业务时,取号等待,编号入队

很明显 这个只要实现队列一切就简单了 其实c++有quene类 这里我们自己实现它

剩下的自己来写就好了 很简单的

首先一个链表的

#include<iostream>
usingnamespacestd;
//链表
typedefstructQDode
{
intn;
structQDode*next;
}*pqdode,qdode;
//队列
typedefstructMyQueue
{
pqdodefront;
pqdoderear;
}*pmyqueue,myqueue;
boolInit_queue(pmyqueuequ);//初始化队列
boolIs_empty(pmyqueuequ);//判断队列是否为空
voidPut_queue(pmyqueuequ,intval);//入队
intOut_queue(pmyqueuequ);//出队
intTravel_queue(pmyqueuequ);//遍历队列
voidDestory_queue(pmyqueuequ);//销毁队列
//主函数
intmain()
{
myqueuequeue={NULL,NULL};

Init_queue(&queue);//初始化

Put_queue(&queue,5);//入队

if(!Is_empty(&queue))
{
cout<<"队列不为空"<<endl;
}

Put_queue(&queue,6);
Put_queue(&queue,7);
Put_queue(&queue,8);
Put_queue(&queue,9);


Travel_queue(&queue);//遍历

intval=Out_queue(&queue);
cout<<endl<<endl<<val<<endl<<endl;

Travel_queue(&queue);//遍历

intvall=Out_queue(&queue);
cout<<endl<<endl<<vall<<endl<<endl;

Travel_queue(&queue);//遍历

Destory_queue(&queue);//销毁
cout<<endl;
return0;
}
boolInit_queue(pmyqueuequ)
{
qu->front=newqdode;
if(qu->front==NULL)
{
cout<<"动态分配内存失败!"<<endl;
returnfalse;
}
else
{
qu->rear=qu->front;
qu->front->next=NULL;
returntrue;
}
}
voidDestory_queue(pmyqueuequ)
{
pqdodep=qu->front,q=NULL;
while(p)
{
q=p->next;
deletep;
p=q;
}
p=NULL;
}
voidPut_queue(pmyqueuequ,intval)
{
qu->rear->n=val;
pqdodeq=qu->rear;
pqdodep=newqdode;
p->next=NULL;
qu->rear=p;
q->next=p;
}
boolIs_empty(pmyqueuequ)
{
if(qu->front!=qu->rear)
{
returnfalse;
}
else
{
returntrue;
}
}
intTravel_queue(pmyqueuequ)
{
intcount=0;
if(Is_empty(qu))
{
cout<<"该队列为空!"<<endl;
return0;
}
else
{
pqdodep=qu->front,q=NULL;
while(p!=qu->rear)
{
count++;
cout<<p->n<<"";
if(!(count%5))
{
cout<<endl;
}
p=p->next;
}
returncount;
}

}
intOut_queue(pmyqueuequ)
{
if(Is_empty(qu))
{
cout<<"该队列为空!"<<endl;
return-1;
}
else
{
intval=qu->front->n;
pqdodep=qu->front->next;
deletequ->front;
qu->front=p;
returnval;
}
}

然后一个数组实现的

#include<iostream>

usingnamespacestd;

classQUEUE//队列类
{
private://私有成员
int*pBase;
intfront,rear;
intcount;
public://公有成员
boolIs_empty();//判断是否为空
boolIs_full();//判断是否满
voidenter_queue(intn);//入队
intout_queue();//出队
voidtravel_queue();//遍历队
QUEUE(intnumber=100)
{
front=rear=0;
pBase=newint[number+1];
count=number+1;
}
~QUEUE()
{
delete[]pBase;
}
};
intmain()
{
QUEUEqueue(5);
queue.enter_queue(1);
queue.enter_queue(2);
queue.enter_queue(3);
queue.enter_queue(4);
queue.enter_queue(5);
queue.enter_queue(6);
queue.travel_queue();
queue.out_queue();
queue.travel_queue();
queue.out_queue();
queue.travel_queue();
queue.out_queue();
queue.travel_queue();
queue.out_queue();
queue.travel_queue();
queue.out_queue();
queue.travel_queue();
queue.out_queue();
if(queue.Is_full())
{
cout<<"wangbadan"<<endl;
}
intn=queue.out_queue();
cout<<n<<endl;
queue.travel_queue();
intn1=queue.out_queue();
cout<<n1<<endl;
queue.travel_queue();
return0;
}
boolQUEUE::Is_empty()//判断是否满
{
if(front==rear)
{
returntrue;
}
else
{
returnfalse;
}
}
boolQUEUE::Is_full()//判断是否空
{
if((rear+1)%count==front)
{
returntrue;
}
else
{
returnfalse;
}
}
voidQUEUE::enter_queue(intn)//入队
{
if(Is_full())
{
cout<<"队列已满!"<<endl;
}
else
{
pBase[rear]=n;
rear=(rear+1)%count;
}
return;
}
intQUEUE::out_queue()//出队
{
intn=pBase[front];
if(Is_empty())
{
cout<<"该队列已空!"<<endl;
returnfalse;
}
else
{
front=(front+1)%count;
returnn;
}
}
voidQUEUE::travel_queue()//遍历
{
intj=0;
for(inti=front;i%count!=rear;i++)
{
j++;
cout<<pBase[i%count]<<"";
if(j==5)
{
cout<<endl;
j=0;
}
}
if(j)
{
cout<<endl;
}
return;
}

❿ 模拟实现一个银行叫号程序 (c语言)

#include<stdio.h>
main()
{
int n,i;
n=0;
while(1)
{
printf("请输入指令:");
scanf("%d",&i);
if(i==0)
break;
if(i==1)
{
if(n==0)
printf("您前面无人排队,请直接去柜台办理业务\n");
else
printf("您前面还有%d位,请等待\n",n);
n++;
}
if(i==2)
{
if(n>0)
n--;
}
}
}