user-0 提问: C代码报错

回复:
user: user-1
content: 你自己看看，贴的代码能看么。。。 用论坛里自带的插入代码来贴代码吧

user: user-0
content: #include<stdio.h>#include<string.h>#include<stdlib.h>int i = 0;int q = 0;int p;struct yonghu{	char name[100];	char password[7];	int money;	int user;};yonghu a[1000];void zhujiemian(){	printf("欢迎进入ATM管理系统。\n");	printf("按任意键继续。\n");	getchar();	system("cls");	printf("1.用户注册。\n");	printf("2.用户登录。\n");	printf("3.退出系统。\n");}void zhujiemian1(){	system("cls");	printf("1.用户注册。\n");	printf("2.用户登录。\n");	printf("3.退出系统。\n");}void zhuce(){	system("cls");	printf("请输入注册用户名。\n");	scanf("%s",&a[i].name);	printf("请输入密码。\n");	scanf("%s",&a[i].password);	printf("请输入开户金额\n");	scanf("%d",&a[i].money);	a[i].user = 10000 + i;	printf("注册完成。\n\n");	printf("用户信息如下；\n");                printf("%s 姓名\n%d账号\n%d开户金额\n",a[i].name,a[i].user,a[i].money);	i++;}void denglu(){	system("cls");	int hao;	char mima[7];	int j, k, m = 1;	for (k = 1; k <= 3; k++)	{		printf("请输入账号：");		scanf("%d",&hao);		for (j = 0; j <= i; j++)		{			if (hao == a[j].user)			{				m = 0;				p = j;				break;			}		}		if (m == 1 && k != 3)		{			system("cls");			printf("账号错误，剩余输入机会%d\n：",3 - k);		}		else if (m == 0)		{			break;		}		else if (m == 1 && k == 3)		{			q = 1;			break;		}	}	for (k = 1; k <= 3; k++)	{		if (q == 1)		{			break;		}		printf("请输入密码：");		scanf("%s", mima);		if (strcmp(a[p].password, mima) == 0)		{			m = 0;		}		else		{			m = 1;		}		if (m == 1 && k != 3)		{			system("cls");			printf("密码错误，剩余输入机会%d\n：",3 - k );		}		else if (m == 0)		{			q = 0;			break;		}		else if (m == 1 && k == 3)		{			q = 1;			break;		}	}}void fuwujiemian(){	printf("1.存款。\n");	printf("2.取款。\n");	printf("3.转帐。\n");	printf("4.更改密码。\n");	printf("5.查询信息。\n");	printf("6.退出系统。\n");}void cunkuan(){	system("cls");	int jine;	printf("请输入存款金额：\n");	scanf("%d", &jine);	a[p].money += jine;	printf("存款成功，账户余额为%d\n：",a[p].money);}void qukuan(){	system("cls");	int qukuan;	printf("当前账户剩余金额%d\n：",a[p].money);	printf("请输入取款金额：");	scanf("%d",qukuan);	a[p].money -= qukuan;	printf("取款成功，账户余额为%d\n：",a[p].money);}void zhuanzhang(){	system("cls");	int zhuanzhang;	int zhanghao;	printf("请输入对方账号：");	scanf("%d",&zhanghao);	printf("请输入转账金额：");	scanf("%d",&zhuanzhang);	a[p].money -= zhuanzhang;	printf("转账成功，账户余额为%d\n：",a[p].money);}void gaimi(){	while (1)	{		system("cls");		char mima1[7],mima2[7];		printf("请输入新密码：");		scanf("%d",&mima1);		printf("\n");		printf("再次输入新密码：");		scanf("%d",&mima2);		if (strcmp(mima1, mima2) == 0)		{			printf("修改成功。\n");			strcpy(a[p].password, mima1);			break;		}		else		{			printf("两次密码输入不一致，重新输入\n");			getchar();			getchar();		}	}}void dayin(){	system("cls");	printf("%s 姓名\n%d账号\n%d余额\n",a[i].name,a[i].user,a[i].money);}void fuwu(){	system("cls");	fuwujiemian();	int m;	while (1)	{		scanf("%d",&m);		if (m == 6)		{			q = 2;			break;		}		if (m == 1)		{			cunkuan();		}		if (m == 2)		{			qukuan();		}		if (m == 3)		{			zhuanzhang();		}		if (m == 4)		{			gaimi();		}		if (m == 5)		{			dayin();		}		printf("按任意键继续。\n");		getchar();		getchar();		system("cls");		fuwujiemian();	}}void menu(){	int n;	while (1)	{		if (q == 1)		{			system("cls");			printf("账号密码都不知道，还取什么钱？\n");			break;		}		if (q == 2)		{			system("cls");			printf("感谢使用本系统\n");			break;		}		scanf("%d",&n);		if (n == 1)		{			zhuce();			printf("按任意键继续\n");			getchar();			getchar();			zhujiemian1();		}		else if (n == 2)		{			denglu();			if (q == 0)			{				fuwu();			}		}		else if (n == 3)		{			system("cls");			printf("感谢使用本系统\n");			break;		}	}}int main(){	zhujiemian();	menu();	return 0;}