#include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
typedef struct card
{
int cardNumber;
int cardPassword;
float money;
bool state;
}Card;
//卡号相关函数
int cardManage(Card card[],int cardCount)
{
printf("请输入卡号:");
int cardNo=0;
while (1) {
scanf("%d",&cardNo);
for (int i = 0 ;i<cardCount; i++) {
if (cardNo==card[i].cardNumber&&card[i].state==1) {
return i;
}else if (cardNo==card[i].cardNumber&&card[i].state==0){
printf("你的卡已被锁定,24小时不能操作,请及时联系我行工作人员。\n");
return -1;
}else
continue;
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
typedef struct card
{
int cardNumber;
int cardPassword;
float money;
bool state;
}Card;
//卡号相关函数
int cardManage(Card card[],int cardCount)
{
printf("请输入卡号:");
int cardNo=0;
while (1) {
scanf("%d",&cardNo);
for (int i = 0 ;i<cardCount; i++) {
if (cardNo==card[i].cardNumber&&card[i].state==1) {
return i;
}else if (cardNo==card[i].cardNumber&&card[i].state==0){
printf("你的卡已被锁定,24小时不能操作,请及时联系我行工作人员。\n");
return -1;
}else
continue;