Click the blue text
Follow us
Source from the internet, please delete if infringing
Bank ATM Deposit and Withdrawal System
The business description of the bank ATM deposit and withdrawal system is as follows:
The bank ATM deposit and withdrawal system can provide users with functions such as deposit, withdrawal, inquiry, transfer, and password modification. To simulate a real ATM business environment, this system must implement functions such as deposit, withdrawal, inquiry, transfer, password modification, and account opening. Users can open a bank account through the account opening service in this system, and then log in to the ATM system using this bank account to perform operations such as deposit, withdrawal, query account information, and modify passwords. The various services of this system have the following points to note:
- (1) Logging into the system
Before logging in, users must enter their bank account on the login screen and log in to the system using the correctly entered bank account.
- (2) Account opening service
To use this system, one must first perform the account opening service to establish a new bank account, and store the newly opened bank account in a file. At the same time, the system uses the ID card number as a sufficient condition for account opening, meaning that one ID card number can only open one bank account.
- (3) Deposit service
After logging into the system, customers can choose the deposit service to deposit the entered deposit amount into the corresponding account.
- (4) Withdrawal service
After logging into the system, customers can choose the withdrawal service to withdraw the entered withdrawal amount from the corresponding bank account, but the withdrawal amount must be greater than the current account balance.
- (5) Inquiry service
After logging into the system, customers can choose the inquiry service to check the account balance.
- (6) Transfer service
After logging into the system, customers can choose the transfer service to make a transfer. Note that the destination account for the transfer must be an existing bank account in this system.
- (7) Password modification
After logging into the system, customers can choose the password modification service to change their password.
Implemented effects





Source Code
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define N 1000
#include<conio.h>
struct chuhu{
char idnum[9];//Account
char name[10];//Name
char idnumber[20];//ID card number
char password[7];//Password
double cunkuan;//Deposit
}hu[N];
void date();//Display current date
int a,a1;//Main interface selection variables
void Flag1();//Main interface
void Flag2();//User interface
void Flag3();//User function selection interface
void zhuce();//Registration
int yanzheng();//Validate deposit slip number or password
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
void qukaun();//Withdrawal
void cunkaun();//Deposit
void display();//Inquiry
void zhuan();//Transfer
void xiugai();//Password modification
void display();//Search
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
int A,key;//Number of account holders
int i;//Control password loop
char ch='y';//Whether to continue registration
double jin;//Money to be deposited
int t;
char id[11],password[7];
int main(){
system("COLOR 0A"); int b;
Flag1();//Introduce main interface
do{
printf("\n\n\t\t##Please enter your choice:");
scanf("%d",&a);
switch(a){
case 1:{
zhuce();//Registration
Flag1();
break;
}
case 2:{
b=yanzheng();
fflush(stdin);///Good thing, to prevent skipping data
Flag2();
break;
}
case 3:exit(0);break;
default:printf("\n\n\n\t\tYour input data does not meet the requirements!!!\n\n\n\n\n");
}
}while(1);
}
void Flag1(){
printf("\n#################################################################################\n");
printf("\n▓ * Bank Fixed Deposit Management System * ▓\n");
printf("\n#################################################################################\n");
printf("\n ◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆\n");
printf(" |◆|******|◆| |◆|******|◆|\n");
printf(" |◆|******|◆| ☆ Account Opening Service Press 1 |◆|******|◆|\n");
printf(" |◆|******|◆| ☆ Login System Press 2 |◆|******|◆|\n");
printf(" |◆|******|◆| ☆ Exit Press 3 |◆|******|◆|\n");
printf(" |◆|******|◆| |◆|******|◆|\n");
printf(" ◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆\n");
printf("\n#################################################################################\n");
}
//********************************************************************************************************************
//User interface Follow the public account: C Language Chinese Community, follow to receive 300G programming materials for free
void Flag2(){
int a,b;//Variable for selecting functions
do{
printf("\n\nPress ENTER to enter, return to the main menu " );
fflush(stdin);
scanf("%c",&ch);
system("cls");//Clear screen
date();
printf("\n#################################################################################\n");
printf("\n▓ * Welcome to use * ▓\n");
printf("\n#################################################################################\n");
printf("\n ◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆\n");
printf(" |◆|******|◆| ☆ Deposit Service Press 1 |◆|******|◆|\n");
printf(" |◆|******|◆| ☆ Withdrawal Service Press 2 |◆|******|◆|\n");
printf(" |◆|******|◆| ☆ Inquiry Service Press 3 |◆|******|◆|\n");
printf(" |◆|******|◆| ☆ Transfer Service Press 4 |◆|******|◆|\n");
printf(" |◆|******|◆| ☆ Modify Password Press 5 |◆|******|◆|\n");
printf(" |◆|******|◆| ☆ Exit System Press 6 |◆|******|◆|\n");
printf(" |◆|******|◆| |◆|******|◆|\n");
printf(" ◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆\n");
printf("\n#################################################################################\n");
printf("\n▓ ******************************* ▓\n");
printf("\n#################################################################################\n");
printf("\n\n\t\t##Please enter your choice:");
fflush(stdin);
scanf("%d",&a);
switch(a){//Registration
case 1: { system("cls");fflush(stdin);cunkaun();break;//Deposit
}
case 2: {system("cls");fflush(stdin);qukaun();break;//Withdrawal
}
case 3: {display();//Inquiry service
break;
}
case 4:{system("cls");fflush(stdin);zhuan();break;//Transfer
}
case 5: {system("cls");fflush(stdin);xiugai();break;//Password modification
}
case 6: exit(0);
default:printf("You entered an incorrect choice, please enter the correct option:");
}
} while(1);
}
//********************************************************************************************************************
//User function selection interface
void Flag3(){
printf("\n\n\t\t##Please enter your choice:");
scanf("%d",&a1);
switch(a1){
case 1:printf("Deposit service");break;
case 2:printf("Withdrawal service");break;
case 3:printf("Inquiry service");break;
case 4:printf("Transfer service");break;
case 5:printf("Password modification");break;
case 6:printf("Exit");break;
}
}
//********************************************************************************************************************
//Account opening
void zhuce(){
FILE *nchuhu=fopen("chuh.txt","r");
FILE *fchuhu=fopen("chuh.txt","a");
int i;
if((nchuhu=fopen("chuh.txt","r"))==NULL) printf("File does not exist, system creates it\n");
do{
system("cls");
date();//Display current date
printf("\n\n\t\tPlease enter the new depositor's information:");
fscanf(nchuhu,"%s\t%s\t%s\t%s\t%lf\n",&hu[A].idnum,&hu[A].name,&hu[A].idnumber,&hu[A].password,&hu[A].cunkuan);
printf("\n\n\t\tDepositor's deposit slip:");
fflush(stdin);
gets(hu[A].idnum);
printf("\n\t\tName:");
fflush(stdin);
gets(hu[A].name);
printf("\n\t\tDepositor's password (6 digits):");
for(i=0;i<6;i++){
fflush(stdin);
hu[A].password[i]=getch();
printf("*");
// scanf("%d",&hu[A].password[i]);
}
do{
printf("Please enter the ID card number (18 digits):");
fflush(stdin);
gets(hu[A].idnumber);
if(strlen(hu[A].idnumber)!=18)//strlen means
printf("\n\t\tInput error!\n\t\tID card must be 18 digits or letters\n");
for(i=0;i<A;i++)
if(strcmp(hu[A].idnumber,hu[i].idnumber)==0&&strcmp(hu[A].name,hu[i].name)==0)
break;
if(i<A)
printf("\n\n\t\tSomeone has already registered with this ID card\n\n\t\tPlease re-enter the ID card number:\n");
}while((strlen(hu[A].idnumber)!=18)||(strcmp(hu[A].idnumber,hu[i].idnumber)==0)&&(strcmp(hu[A].name,hu[i].name)!=0) );
printf("Input the amount to be stored:");
fflush(stdin);
scanf("%lf",&hu[A].cunkuan);
fprintf(fchuhu,"%s\t%s\t%s\t%s\t%lf\n",hu[A].idnum,hu[A].name,hu[A].idnumber,hu[A].password,hu[A].cunkuan);
A++;
printf("Would you like to continue? (y)/No(n)?");
fflush(stdin);
scanf("%c",&ch);
}while(ch=='y'||ch=='Y');
printf("Deposit successful!\n");
// system("pause");
system("cls");
fclose(nchuhu);
fclose(fchuhu);
}
//********************************************************************************************************************
//Validate deposit slip number or password
int yanzheng(){
FILE *fchuhu=fopen("chuh.txt","r");
int count=0;
char id[9];
for(i=0;i<=100;i++){
fscanf(fchuhu,"%s\t%s\t%s\t%s\t%lf\n",&hu[i].idnum,&hu[i].name,&hu[i].idnumber,&hu[i].password,&hu[i].cunkuan);
}
do{
system("cls");
printf("\n\n\n\t\t$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n");
printf("\t\t|#| |#|\n");
printf("\t\t|#| ☆☆☆☆☆☆☆☆☆☆ |#|\n");
printf("\t\t|#| ☆ ☆ |#|\n");
printf("\t\t|#| ☆ Deposit slip number or password error will return automatically ☆ |#|\n");
printf("\t\t|#| ☆ ☆ |#|\n");
printf("\t\t|#| ☆☆☆☆☆☆☆☆☆☆ |#|\n");
printf("\t\t|#| |#|\n");
printf("\t\t$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n");
printf("\n\n\n\t\t Please enter your deposit slip number: ");
scanf("%s",&id);
printf("\n\n\n\t\t Please enter your password: ");
for(i=0;i<6;i++){
fflush(stdin);
password[i]=getch();
printf("*");
}
password[6]='\0';
fflush(stdin);
scanf("c",&ch);
printf("\n\n\t\t");
for(i=0;i<99;i++){
if(strcmp(id,hu[i].idnum)==0&&strcmp(password,hu[i].password)==0){
fclose(fchuhu);
return 0;
}
}
}while(count==0);
fclose(fchuhu);
return count;
}
//********************************************************************************************************************
//Deposit
void cunkaun(){
FILE *fchuhu=fopen("chuh.txt","r");
FILE *achuhu=fopen("back.txt","w");
char id[9];int i;
if(!fchuhu) printf("Cannot open file:");
if(!achuhu) printf("Cannot create file");
for(i=0;i<=100;i++){
fscanf(fchuhu,"%s\t%s\t%s\t%s\t%lf\n",&hu[i].idnum,&hu[i].name,&hu[i].idnumber,&hu[i].password,&hu[i].cunkuan);
} //
int x=0;
date();
printf("\n\n\t\t##Please re-enter and confirm the deposit slip:");
scanf("%s",&id);
for(i=0;i<=100;i++){
if(strcmp(id,hu[i].idnum)==0){
printf("\n\n");
printf("\t\t||================================================================||\n");
printf("\t\t|| *Deposit Amount* ||\n");
printf("\t\t||================================================================||\n");
printf("\t\t|| ||\n");
printf("\t\t|| ||\n");
printf("\t\t|| 1、200 2、400 3、600 4、800 ||\n");
printf("\t\t|| ||\n");
printf("\t\t|| ||\n");
printf("\t\t|| 5、1000 6、2000 7、4000 8、6000 ||\n");
printf("\t\t|| ||\n");
printf("\t\t||================================================================||\n");
printf("\t\t||================================================================||\n");
printf("\n\n\t\t\tPlease enter your withdrawal amount:");
scanf("%d",&a);
switch(a){
case 1:{jin=200;
printf("\t\t\tDeposited %lf yuan",jin);
printf("\n\n\n\t\t\t^^^^Deposit successful^^^^");
hu[i].cunkuan+=jin;
printf("\n\n\t\t\t$Your balance is: %lf",hu[i].cunkuan);
fprintf(achuhu,"%s\t%s\t%s\t%s\t%lf\n",hu[i].idnum,hu[i].name,hu[i].idnumber,hu[i].password,hu[i].cunkuan);
break;
}
case 2:{jin=400;
printf("\t\t\tDeposited %lf yuan",jin);
printf("\n\n\n\t\t\t^^^^Deposit successful^^^^");
hu[i].cunkuan+=jin;
printf("\n\n\t\t\t$Your balance is: %lf",hu[i].cunkuan);
fprintf(achuhu,"%s\t%s\t%s\t%s\t%lf\n",hu[i].idnum,hu[i].name,hu[i].idnumber,hu[i].password,hu[i].cunkuan);
break;
}
case 3:{
jin=600;
printf("\t\t\tDeposited %lf yuan",jin);
printf("\n\n\n\t\t\t^^^^Deposit successful^^^^");
hu[i].cunkuan+=jin;
printf("\n\n\t\t\t$Your balance is: %lf",hu[i].cunkuan);
fprintf(achuhu,"%s\t%s\t%s\t%s\t%lf\n",hu[i].idnum,hu[i].name,hu[i].idnumber,hu[i].password,hu[i].cunkuan);
break;
}
case 4:{
jin=800;
printf("\t\t\tDeposited %lf yuan",jin);
printf("\n\n\n\t\t\t^^^^Deposit successful^^^^");
hu[i].cunkuan+=jin;
printf("\n\n\t\t\t$Your balance is: %lf",hu[i].cunkuan);
fprintf(achuhu,"%s\t%s\t%s\t%s\t%lf\n",hu[i].idnum,hu[i].name,hu[i].idnumber,hu[i].password,hu[i].cunkuan);
break;
}
case 5:{jin=1000;
printf("\t\t\tDeposited %lf yuan",jin);
printf("\n\n\n\t\t\t^^^^Deposit successful^^^^");
hu[i].cunkuan+=jin;
printf("\n\n\t\t\t$Your balance is: %lf",hu[i].cunkuan);
fprintf(achuhu,"%s\t%s\t%s\t%s\t%lf\n",hu[i].idnum,hu[i].name,hu[i].idnumber,hu[i].password,hu[i].cunkuan);
break;
}
case 6:{jin=2000;
printf("\t\t\tDeposited %lf yuan",jin);
printf("\n\n\n\t\t\t^^^^Deposit successful^^^^");
hu[i].cunkuan+=jin;
printf("\n\n\t\t\t$Your balance is: %lf",hu[i].cunkuan);
fprintf(achuhu,"%s\t%s\t%s\t%s\t%lf\n",hu[i].idnum,hu[i].name,hu[i].idnumber,hu[i].password,hu[i].cunkuan);
break;
}
case 7:{
jin=4000;
printf("\t\t\tDeposited %lf yuan",jin);
printf("\n\n\n\t\t\t^^^^Deposit successful^^^^");
hu[i].cunkuan+=jin;
printf("\n\n\t\t\t$Your balance is: %lf",hu[i].cunkuan);
fprintf(achuhu,"%s\t%s\t%s\t%s\t%lf\n",hu[i].idnum,hu[i].name,hu[i].idnumber,hu[i].password,hu[i].cunkuan);
break;
}
case 8:{
jin=6000;
printf("\t\t\tDeposited %lf yuan",jin);
printf("\n\n\n\t\t\t^^^^Deposit successful^^^^");
hu[i].cunkuan+=jin;
printf("\n\n\t\t\t$Your balance is: %lf",hu[i].cunkuan);
fprintf(achuhu,"%s\t%s\t%s\t%s\t%lf\n",hu[i].idnum,hu[i].name,hu[i].idnumber,hu[i].password,hu[i].cunkuan);
break;
}
default:printf("\n\n\n\t\t\tYour selected amount is not within the service range!!!\n\n\n\t\t\tPlease re-select the service:");
}
fclose(fchuhu);
fclose(achuhu);
system("del chuh.txt");
rename("back.txt","chuh.txt");//rename(old, new)
break;
}
}
}
//*******************************************************************************************************************
//Withdrawal
void qukaun(){
FILE *fchuhu=fopen("chuh.txt","r");
FILE *achuhu=fopen("back.txt","w");
int i;
char id[9];
if(!fchuhu) printf("Cannot open file:");
if(!achuhu) printf("Cannot create new file:");
for(i=0;i<=100;i++){
fscanf(fchuhu,"%s\t%s\t%s\t%s\t%lf\n",&hu[i].idnum,&hu[i].name,&hu[i].idnumber,&hu[i].password,&hu[i].cunkuan);
}
date();
printf("\n\n\t\tPlease re-enter and confirm the deposit slip:");
scanf("%s",&id);
for(i=0;i<=99;i++){
if(strcmp(id,hu[i].idnum)==0){
printf("\n\n");
printf("\t\t||================================================================||\n");
printf("\t\t|| *Withdrawal Amount* ||\n");
printf("\t\t||================================================================||\n");
printf("\t\t|| ||\n");
printf("\t\t|| ||\n");
printf("\t\t|| 1、200 2、400 3、600 4、800 ||\n");
printf("\t\t|| ||\n");
printf("\t\t|| ||\n");
printf("\t\t|| 5、1000 6、2000 7、4000 8、6000 ||\n");
printf("\t\t|| ||\n");
printf("\t\t||================================================================||\n");
printf("\t\t||================================================================||\n");
printf("\n\n\t\t\tPlease enter your withdrawal amount:");
scanf("%d",&a);
switch(a){
case 1:{jin=200;
printf("\t\t\tWithdrew %lf yuan",jin);
printf("\n\n\n\t\t\t^^^^Withdrawal successful^^^^");
hu[i].cunkuan-=jin;
printf("\n\n\t\t\t$Your balance is: %lf",hu[i].cunkuan);
fprintf(achuhu,"%s\t%s\t%s\t%s\t%lf\n",hu[i].idnum,hu[i].name,hu[i].idnumber,hu[i].password,hu[i].cunkuan);
break;
}
case 2:{jin=400;
printf("\t\t\tWithdrew %lf yuan",jin);
printf("\n\n\n\t\t\t^^^^Withdrawal successful^^^^");
hu[i].cunkuan-=jin;
printf("\n\n\t\t\t$Your balance is: %lf",hu[i].cunkuan);
fprintf(achuhu,"%s\t%s\t%s\t%s\t%lf\n",hu[i].idnum,hu[i].name,hu[i].idnumber,hu[i].password,hu[i].cunkuan);
break;
}
case 3:{jin=600;
printf("\t\t\tWithdrew %lf yuan",jin);
printf("\n\n\n\t\t\t^^^^Withdrawal successful^^^^");
hu[i].cunkuan-=jin;
printf("\n\n\t\t\t$Your balance is: %lf",hu[i].cunkuan);
fprintf(achuhu,"%s\t%s\t%s\t%s\t%lf\n",hu[i].idnum,hu[i].name,hu[i].idnumber,hu[i].password,hu[i].cunkuan);
break;
}
case 4:{
jin=800;
printf("\t\t\tWithdrew %lf yuan",jin);
printf("\n\n\n\t\t\t^^^^Withdrawal successful^^^^");
hu[i].cunkuan-=jin;
printf("\n\n\t\t\t$Your balance is: %lf",hu[i].cunkuan);
fprintf(achuhu,"%s\t%s\t%s\t%s\t%lf\n",hu[i].idnum,hu[i].name,hu[i].idnumber,hu[i].password,hu[i].cunkuan);
break;
}
case 5:{jin=1000;
printf("\t\t\tWithdrew %lf yuan",jin);
printf("\n\n\n\t\t\t^^^^Withdrawal successful^^^^");
hu[i].cunkuan-=jin;
printf("\n\n\t\t\t$Your balance is: %lf",hu[i].cunkuan);
fprintf(achuhu,"%s\t%s\t%s\t%s\t%lf\n",hu[i].idnum,hu[i].name,hu[i].idnumber,hu[i].password,hu[i].cunkuan);
break;
}
case 6:{jin=2000;
printf("\t\t\tWithdrew %lf yuan",jin);
printf("\n\n\n\t\t\t^^^^Withdrawal successful^^^^");
hu[i].cunkuan-=jin;
printf("\n\n\t\t\t$Your balance is: %lf",hu[i].cunkuan);
fprintf(achuhu,"%s\t%s\t%s\t%s\t%lf\n",hu[i].idnum,hu[i].name,hu[i].idnumber,hu[i].password,hu[i].cunkuan);
break;
}
case 7:{jin=4000;
printf("\t\t\tWithdrew %lf yuan",jin);
printf("\n\n\n\t\t\t^^^^Withdrawal successful^^^^");
hu[i].cunkuan-=jin;
printf("\n\n\t\t\t$Your balance is: %lf",hu[i].cunkuan);
fprintf(achuhu,"%s\t%s\t%s\t%s\t%lf\n",hu[i].idnum,hu[i].name,hu[i].idnumber,hu[i].password,hu[i].cunkuan);
break;
}
case 8:{jin=6000;
printf("\t\t\tWithdrew %lf yuan",jin);
printf("\n\n\n\t\t\t^^^^Withdrawal successful^^^^");
hu[i].cunkuan-=jin;
printf("\n\n\t\t\t$Your balance is: %lf",hu[i].cunkuan);
fprintf(achuhu,"%s\t%s\t%s\t%s\t%lf\n",hu[i].idnum,hu[i].name,hu[i].idnumber,hu[i].password,hu[i].cunkuan);
break;
}
default:printf("\n\n\n\t\t\tYour selected amount is not within the service range!!!\n\n\n\t\t\tPlease re-select the service:");
}
fclose(fchuhu);
fclose(achuhu);
system("del chuh.txt");
rename("back.txt","chuh.txt");
break;
}
}
}
//********************************************************************************************************************
//Transfer
void zhuan(){
FILE *fchuhu=fopen("chuh.txt","r+");
int i;
char id[9];
if(!fchuhu) printf("Cannot open file:");
for(i=0;i<=100;i++){
fscanf(fchuhu,"%s\t%s\t%s\t%s\t%lf\n",&hu[i].idnum,&hu[i].name,&hu[i].idnumber,&hu[i].password,&hu[i].cunkuan);
}
date();
printf("\n\n\t\tPlease enter the deposit slip number of the transferor:");
scanf("%s",&id);
for(i=0;i<=99;i++){
if(strcmp(id,hu[i].idnum)==0){
printf("\n\n\t\tPlease enter the amount to be transferred:");
scanf("%lf",&jin);
printf("\n\n\t\tPlease confirm the amount: %lf",jin);
hu[i].cunkuan+=jin;
printf("\n\n\nTransfer successful");
fprintf(fchuhu,"%s\t%s\t%s\t%s\t%lf\n",hu[A].idnum,hu[A].name,hu[A].idnumber,hu[A].password,hu[A].cunkuan);
fclose(fchuhu);
fclose(fchuhu);
break;
}
}
}
//********************************************************************************************************************
//********************************************************************************************************************
void xiugai(){
FILE *fchuhu=fopen("chuh.txt","r");
FILE *achuhu=fopen("back.txt","w");
int j,i;
char id[9];
if(!fchuhu) printf("Cannot open file:");
if(!achuhu) printf("Cannot create new file:");
for(i=0;i<=100;i++){
fscanf(fchuhu,"%s\t%s\t%s\t%s\t%lf\n",&hu[i].idnum,&hu[i].name,&hu[i].idnumber,&hu[i].password,&hu[i].cunkuan);
}
date();
printf("\n\n\t\tPlease re-enter and confirm the deposit slip:");
scanf("%s",&id);
for(i=0;i<=99;i++){
if(strcmp(id,hu[i].idnum)==0){
printf("Please enter a new password:\n");
printf("\n\t\tDepositor's password (6 digits):");
for(j=0;j<6;j++){
fflush(stdin);
hu[i].password[j]=getch();
printf("*");
}
printf("\n\n\t\tNew password: %s\n",hu[i].password);
printf("\n\n\t\tModification successful");
fprintf(achuhu,"%s\t%s\t%s\t%s\t%lf\n",hu[A].idnum,hu[A].name,hu[A].idnumber,hu[A].password,hu[A].cunkuan);
fclose(fchuhu);
fclose(achuhu);
system("del chuh.txt");
rename("back.txt","chuh.txt");
break;
}
}
}
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&//Query information
void display(){
FILE *fchuhu=fopen("chuh.txt","r");
int i,n=0;
char fnumb[9];
system("cls");
for(i=0;i<=100;i++){
fscanf(fchuhu,"%s\t%s\t%s\t%s\t%lf\n",&hu[i].idnum,&hu[i].name,&hu[i].idnumber,&hu[i].password,&hu[i].cunkuan);
}
printf("\n\n●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●\n");
printf("\n\n ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●● \n");
printf("\n\n ●●●●●●●●●●●●●●●●●●●●●●●●●● \n");
printf("\n\n\t\t\t\tPlease enter your deposit slip number:");
scanf("%s",&fnumb);
printf("\n\n\n");
printf("\t\t\t\tYour personal information is as follows:");
printf("\n\n");
for(i=0;i<=99;i++)
if(strcmp(fnumb,hu[i].idnum)==0){
printf("Deposit slip number: %s\tName: %s\tID card: %s\tPassword: %s\tDeposit amount: %lf\n",hu[i].idnum,hu[i].name,hu[i].idnumber,hu[i].password,hu[i].cunkuan);
n=1;
fclose(fchuhu);
system("pause");
break;
}
if(n==0) printf("This account does not exist!!!\n");
fclose(fchuhu);
}
//********************************************************************************************************************
void date(){//Display current date
printf("Current date:");
system("date/t");
printf("Current time:");
system("time/t");
}
Business Process
1. User Account Opening
2. Login Process
3. Password Modification
If you are over 18 years old and find learning [C Language] too difficult? Want to try other programming languages, then I recommend you learn Python, currently, a 499 yuan value Python beginner course is available for free, limited to 10 spots!
▲ Scan the QR code - Get it for free
Click to read the original text for more information