user-0 提问: 求大神帮帮忙，看一下是哪里的错误！

回复:
user: user-1
content: 代码功能归根结底不是别人帮自己看或讲解或注释出来的；而是被自己静下心来花足够长的时间和精力亲自动手单步或设断点或对执行到某步获得的中间结果显示或写到日志文件中一步一步分析出来的。 提醒：再牛×的老师也无法代替学生自己领悟和上厕所！ 单步调试和设断点调试（VS IDE中编译连接通过以后，按F10或F11键单步执行，按Shift+F11退出当前函数；在某行按F9设断点后按F5执行停在该断点处。）是程序员必须掌握的技能之一。

user: user-2
content: //电费进度条 void dfjdt01() { 	int zx02; 	int i; 	system("cls"); 	gotoxy(28,11); 	printf("正在充值!!"); 	gotoxy(1,12); 	for(i=0;i<=79;i++) 	{ 		Sleep(10); 		printf(">"); 		if(i>=79) 		{ 			gotoxy(28,11); 			printf("充值成功!!"); 		} 	} 	while(1) 	{ 			system("cls"); 			printf("\t\t    --------------------------------------------\n"); 			printf("                    |           是否前往用户中心?              |\n"); 			printf("                    |           1=是的                         |\n"); 			printf("                    |           2=我要回到电费充值中心         |\n"); 			printf("                    |请输入您的选项:                           |\n"); 			printf("\t\t    --------------------------------------------\n"); 			gotoxy(37,5); 			fflush(stdin); 			scanf("%d",&zx02); 			if(zx02==1) 			{ 				jdt(); 				main(); 			} 			else if(zx02==2) 			{ 				jdt(); 				dfye01(); 			} 			else 			{ 				gotoxy(30,8); 				printf("对不起，您的输入有误,请确认后在输入!"); 				system("pause>null&&cls"); 			} 	} }   //网费进度条 //网费进度条  void wfjdt01() { 	int zx02; 	int i; 	system("cls"); 	gotoxy(28,11); 	printf("正在充值!!"); 	gotoxy(1,12); 	for(i=0;i<=79;i++) 	{ 		Sleep(10); 		printf(">"); 		if(i>=79) 		{ 			gotoxy(28,11); 			printf("充值成功!!"); 		} 	} 	while(1) 	{ 			system("cls"); 			printf("\t\t    --------------------------------------------\n"); 			printf("                    |           是否前往用户中心?              |\n"); 			printf("                    |           1=是的                         |\n"); 			printf("                    |           2=我要回到宽带充值中心         |\n"); 			printf("                    |请输入您的选项:                           |\n"); 			printf("\t\t    --------------------------------------------\n"); 			gotoxy(37,5); 			fflush(stdin); 			scanf("%d",&zx02); 			if(zx02==1) 			{ 				jdt(); 				main(); 			} 			else if(zx02==2) 			{ 				jdt(); 				wfye01(); 			} 			else 			{ 				gotoxy(30,8); 				printf("对不起，您的输入有误,请确认后在输入!"); 				system("pause>null&&cls"); 			} 	} }

user: user-2
content: 一个帐号放不上来那么多， 这是下面的函数  //电费函数 void dfye01() { 	int czzx01; 	int yhczdf01; 	char yhczdfzf01; 	int yhye01; 	float dlye01; 	FILE *wj1; 	FILE *wj2; 	wj1=fopen("yhjr01.txt","r"); 	fscanf(wj1,"%d",&yhye01); 	pclose(wj1); 	wj2=fopen("yh01df.txt","r"); 	fscanf(wj2,"%f",&dlye01); 	pclose(wj2); 	while(1) 	{ 		system("cls"); 		printf("--------------------------------------------------------------------------------"); 		printf("--------------------------------|龙腾银行|--------------------------------------"); 		printf("-----------------------------|电费查询或充值|-----------------------------------"); 		printf("--------------------------------------------------------------------------------"); 		printf("--------------------|当前电费余额:                   元|------------------------"); 		printf("--------------------|当前银行卡上余额:               元|------------------------"); 		printf("--------------------------------------------------------------------------------"); 		printf("|1.充值|------------|请输入您的选项:         |--------------------------|2.返回|"); 		printf("--------------------------------------------------------------------------------"); 		printf("--------------------------------------------------------------------------------"); 		gotoxy(35,5); 		printf("%.2f",dlye01); 		gotoxy(39,6); 		printf("%d",yhye01); 		gotoxy(37,8); 		scanf("%d",&czzx01); 		if(czzx01==1) 		{ 			gotoxy(1,11); 			printf("\n\n"); 			printf("--------------------------------------------------------------------------------"); 			printf("---------------------------|请输入充值金额|-------------------------------------"); 			printf("---------------------------|            元|-------------------------------------"); 			printf("--------------------------------------------------------------------------------"); 			printf("---------------------------|y=确认充值    |-------------------------------------"); 			printf("---------------------------|n=我不想充了  |-------------------------------------"); 			printf("--------------------------------------------------------------------------------"); 			printf("-------------------|请输入您的选项(y/n):              |-------------------------"); 			printf("--------------------------------------------------------------------------------"); 			gotoxy(29,15); 			fflush(stdin); 			scanf("%d",&yhczdf01); 			gotoxy(41,20); 			fflush(stdin); 			scanf("%c",&yhczdfzf01); 			if(yhczdfzf01=='y') 			{ 				if(yhye01>yhczdf01) 				{ 					yhye01=yhye01-yhczdf01; 					wj1=fopen("yhjr01.txt","w"); 					fprintf(wj1,"%d",yhye01); 					pclose(wj1); 					dlye01=(dlye01+(float)(yhczdf01)); 					wj2=fopen("yh01df.txt","w"); 					fprintf(wj2,"%f",dlye01); 					pclose(wj2); 					dfjdt01(); 				} 				else 				{ 					printf("您没有银行卡里没有这么多钱!"); 					main(); 				} 			} 			else if(yhczdfzf01=='n') 			{ 				jdt(); 				main(); 			} 		} 		else if(czzx01==2) 		{ 			main(); 		} 		else 		{ 			printf("您的输入有误,请确认后在输入!"); 			system("pause>null&&cls"); 		} 	} 	 }     //网费函数 void wfye01()  { 	int czzx02; 	int yhczdf02; 	char yhczdfzf02; 	int yhye02; 	float dlye02; 	FILE *wj1; 	FILE *wj2; 	wj1=fopen("yhjr01.txt","r"); 	fscanf(wj1,"%d",&yhye02); 	pclose(wj1); 	wj2=fopen("yh01wf.txt","r"); 	fscanf(wj2,"%f",&dlye02); 	pclose(wj2); 	while(1) 	{ 		system("cls"); 		printf("--------------------------------------------------------------------------------"); 		printf("--------------------------------|龙腾银行|--------------------------------------"); 		printf("---------------------------|宽带余额查询或充值|---------------------------------"); 		printf("--------------------------------------------------------------------------------"); 		printf("--------------------|当前宽带余额:                   元|------------------------"); 		printf("--------------------|当前银行卡上余额:               元|------------------------"); 		printf("--------------------------------------------------------------------------------"); 		printf("|1.充值|------------|请输入您的选项:         |--------------------------|2.返回|"); 		printf("--------------------------------------------------------------------------------"); 		printf("--------------------------------------------------------------------------------"); 		gotoxy(37,5); 		printf("%.2f",dlye02); 		gotoxy(39,6); 		printf("%d",yhye02); 		gotoxy(37,8); 		scanf("%d",&czzx02); 		if(czzx02==1) 		{ 			gotoxy(1,11); 			printf("\n\n"); 			printf("--------------------------------------------------------------------------------"); 			printf("---------------------------|请输入充值金额|-------------------------------------"); 			printf("---------------------------|            元|-------------------------------------"); 			printf("--------------------------------------------------------------------------------"); 			printf("---------------------------|y=确认充值    |-------------------------------------"); 			printf("---------------------------|n=我不想充了  |-------------------------------------"); 			printf("--------------------------------------------------------------------------------"); 			printf("-------------------|请输入您的选项(y/n):              |-------------------------"); 			printf("--------------------------------------------------------------------------------"); 			gotoxy(29,15); 			fflush(stdin); 			scanf("%d",&yhczdf02); 			gotoxy(41,20); 			fflush(stdin); 			scanf("%c",&yhczdfzf02); 			if(yhczdfzf02=='y') 			{ 				if(yhye02>yhczdf02) 				{ 					yhye02=yhye02-yhczdf02; 					wj1=fopen("yhjr01.txt","w"); 					fprintf(wj1,"%d",yhye02); 					pclose(wj1); 					dlye02=(dlye02+(float)(yhczdf02)); 					wj2=fopen("yh01wf.txt","w"); 					fprintf(wj2,"%f",dlye02); 					pclose(wj2); 					wfjdt01(); 				} 				else 				{ 					printf("您没有银行卡里没有这么多钱!"); 					main(); 				} 			} 			else if(yhczdfzf02=='n') 			{ 				jdt(); 				main(); 			} 		} 		else if(czzx02==2) 		{ 			jdt(); 			main(); 		} 		else 		{ 			printf("您的输入有误,请确认后在输入!"); 			system("pause>null&&cls"); 		} 	} }     //进度条函数 void jdt() { 	int i; 	system("cls"); 	gotoxy(28,11); 	printf("预防电信网络诈骗!"); 	gotoxy(1,12); 	for(i=0;i<=79;i++) 	{ 		Sleep(10); 		printf(">"); 	} }   //光标定位函数 //光标定位模块  //gotoxy(43,8);X代表横坐标,y代表纵坐标  void gotoxy(int x,int y) //extern void gotoxy(int x,int y) { 	COORD c; 	c.X=x-1; 	c.Y=y-1; 	SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),c); }   //话费进度条函数 void hfjdt01() { 	int zx01; 	int i; 	system("cls"); 	gotoxy(28,11); 	printf("正在充值!!"); 	gotoxy(1,12); 	for(i=0;i<=79;i++) 	{ 		Sleep(10); 		printf(">"); 		if(i>=79) 		{ 			gotoxy(28,11); 			printf("充值成功!!"); 		} 	} 	while(1) 	{ 			system("cls"); 			printf("\t\t    --------------------------------------------\n"); 			printf("                    |           是否前往用户中心?              |\n"); 			printf("                    |           1=是的                         |\n"); 			printf("                    |           2=我要回到话费充值中心         |\n"); 			printf("                    |请输入您的选项:                           |\n"); 			printf("\t\t    --------------------------------------------\n"); 			gotoxy(37,5); 			fflush(stdin); 			scanf("%d",&zx01); 			if(zx01==1) 			{ 				jdt(); 				main(); 			} 			else if(zx01==2) 			{ 				jdt(); 				hfye01(); 			} 			else 			{ 				gotoxy(30,8); 				printf("对不起，您的输入有误,请确认后在输入!"); 				system("pause>null&&cls"); 			} 	} }   //水费进度条函数 void sfjdt01() { 	int zx02; 	int i; 	system("cls"); 	gotoxy(28,11); 	printf("正在充值!!"); 	gotoxy(1,12); 	for(i=0;i<=79;i++) 	{ 		Sleep(10); 		printf(">"); 		if(i>=79) 		{ 			gotoxy(28,11); 			printf("充值成功!!"); 		} 	} 	while(1) 	{ 			system("cls"); 			printf("\t\t    --------------------------------------------\n"); 			printf("                    |           是否前往用户中心?              |\n"); 			printf("                    |           1=是的                         |\n"); 			printf("                    |           2=我要回到水费充值中心         |\n"); 			printf("                    |请输入您的选项:                           |\n"); 			printf("\t\t    --------------------------------------------\n"); 			gotoxy(37,5); 			fflush(stdin); 			scanf("%d",&zx02); 			if(zx02==1) 			{ 				jdt(); 				main(); 			} 			else if(zx02==2) 			{ 				jdt(); 				sfye01(); 			} 			else 			{ 				gotoxy(30,8); 				printf("对不起，您的输入有误,请确认后在输入!"); 				system("pause>null&&cls"); 			} 	} }  //天然气进度条函数 void trqjdt01() { 	int zx02; 	int i; 	system("cls"); 	gotoxy(28,11); 	printf("正在充值!!"); 	gotoxy(1,12); 	for(i=0;i<=79;i++) 	{ 		Sleep(10); 		printf(">"); 		if(i>=79) 		{ 			gotoxy(28,11); 			printf("充值成功!!"); 		} 	} 	while(1) 	{ 			system("cls"); 			printf("\t\t    --------------------------------------------\n"); 			printf("                    |           是否前往用户中心?              |\n"); 			printf("                    |           1=是的                         |\n"); 			printf("                    |           2=我要回到天然气充值中心       |\n"); 			printf("                    |请输入您的选项:                           |\n"); 			printf("\t\t    --------------------------------------------\n"); 			gotoxy(37,5); 			fflush(stdin); 			scanf("%d",&zx02); 			if(zx02==1) 			{ 				jdt(); 				main(); 			} 			else if(zx02==2) 			{ 				jdt(); 				trqye01(); 			} 			else 			{ 				gotoxy(30,8); 				printf("对不起，您的输入有误,请确认后在输入!"); 				system("pause>null&&cls"); 			} 	} }

user: user-0
content: //天然气余额函数 void trqye01() { 	int czzx02; 	int yhczdf02; 	char yhczdfzf02; 	int yhye02; 	float dlye02; 	FILE *wj1; 	FILE *wj2; 	wj1=fopen("yhjr01.txt","r"); 	fscanf(wj1,"%d",&yhye02); 	pclose(wj1); 	wj2=fopen("yh01qf.txt","r"); 	fscanf(wj2,"%f",&dlye02); 	pclose(wj2); 	while(1) 	{ 		system("cls"); 		printf("--------------------------------------------------------------------------------"); 		printf("--------------------------------|龙腾银行|--------------------------------------"); 		printf("--------------------------|天然气余额查询或充值|--------------------------------"); 		printf("--------------------------------------------------------------------------------"); 		printf("--------------------|当前天然气余额:                 元|------------------------"); 		printf("--------------------|当前银行卡上余额:               元|------------------------"); 		printf("--------------------------------------------------------------------------------"); 		printf("|1.充值|------------|请输入您的选项:         |--------------------------|2.返回|"); 		printf("--------------------------------------------------------------------------------"); 		printf("--------------------------------------------------------------------------------"); 		gotoxy(37,5); 		printf("%.2f",dlye02); 		gotoxy(39,6); 		printf("%d",yhye02); 		gotoxy(37,8); 		scanf("%d",&czzx02); 		if(czzx02==1) 		{ 			gotoxy(1,11); 			printf("\n\n"); 			printf("--------------------------------------------------------------------------------"); 			printf("---------------------------|请输入充值金额|-------------------------------------"); 			printf("---------------------------|            元|-------------------------------------"); 			printf("--------------------------------------------------------------------------------"); 			printf("---------------------------|y=确认充值    |-------------------------------------"); 			printf("---------------------------|n=我不想充了  |-------------------------------------"); 			printf("--------------------------------------------------------------------------------"); 			printf("-------------------|请输入您的选项(y/n):              |-------------------------"); 			printf("--------------------------------------------------------------------------------"); 			gotoxy(29,15); 			fflush(stdin); 			scanf("%d",&yhczdf02); 			gotoxy(41,20); 			fflush(stdin); 			scanf("%c",&yhczdfzf02); 			if(yhczdfzf02=='y') 			{ 				if(yhye02>yhczdf02) 				{ 					yhye02=yhye02-yhczdf02; 					wj1=fopen("yhjr01.txt","w"); 					fprintf(wj1,"%d",yhye02); 					pclose(wj1); 					dlye02=(dlye02+(float)(yhczdf02)); 					wj2=fopen("yh01qf.txt","w"); 					fprintf(wj2,"%f",dlye02); 					pclose(wj2); 					trqjdt01(); 				} 				else 				{ 					printf("您没有银行卡里没有这么多钱!"); 					main(); 				} 			} 			else if(yhczdfzf02=='n') 			{ 				jdt(); 				main(); 			} 		} 		else if(czzx02==2) 		{ 			main(); 		} 		else 		{ 			printf("您的输入有误,请确认后在输入!"); 			system("pause>null&&cls"); 		} 	} }

user: user-0
content: //水费余额函数 void sfye01() { 	int czzx02; 	int yhczdf02; 	char yhczdfzf02; 	int yhye02; 	float dlye02; 	FILE *wj1; 	FILE *wj2; 	wj1=fopen("yhjr01.txt","r"); 	fscanf(wj1,"%d",&yhye02); 	pclose(wj1); 	wj2=fopen("yh01sf.txt","r"); 	fscanf(wj2,"%f",&dlye02); 	pclose(wj2); 	while(1) 	{ 		system("cls"); 		printf("--------------------------------------------------------------------------------"); 		printf("--------------------------------|龙腾银行|--------------------------------------"); 		printf("-----------------------------|水费查询或充值|-----------------------------------"); 		printf("--------------------------------------------------------------------------------"); 		printf("--------------------|当前水费余额:                   元|------------------------"); 		printf("--------------------|当前银行卡上余额:               元|------------------------"); 		printf("--------------------------------------------------------------------------------"); 		printf("|1.充值|------------|请输入您的选项:         |--------------------------|2.返回|"); 		printf("--------------------------------------------------------------------------------"); 		printf("--------------------------------------------------------------------------------"); 		gotoxy(35,5); 		printf("%.2f",dlye02); 		gotoxy(39,6); 		printf("%d",yhye02); 		gotoxy(37,8); 		scanf("%d",&czzx02); 		if(czzx02==1) 		{ 			gotoxy(1,11); 			printf("\n\n"); 			printf("--------------------------------------------------------------------------------"); 			printf("---------------------------|请输入充值金额|-------------------------------------"); 			printf("---------------------------|            元|-------------------------------------"); 			printf("--------------------------------------------------------------------------------"); 			printf("---------------------------|y=确认充值    |-------------------------------------"); 			printf("---------------------------|n=我不想充了  |-------------------------------------"); 			printf("--------------------------------------------------------------------------------"); 			printf("-------------------|请输入您的选项(y/n):              |-------------------------"); 			printf("--------------------------------------------------------------------------------"); 			gotoxy(29,15); 			fflush(stdin); 			scanf("%d",&yhczdf02); 			gotoxy(41,20); 			fflush(stdin); 			scanf("%c",&yhczdfzf02); 			if(yhczdfzf02=='y') 			{ 				if(yhye02>yhczdf02) 				{ 					yhye02=yhye02-yhczdf02; 					wj1=fopen("yhjr01.txt","w"); 					fprintf(wj1,"%d",yhye02); 					pclose(wj1); 					dlye02=(dlye02+(float)(yhczdf02)); 					wj2=fopen("yh01sf.txt","w"); 					fprintf(wj2,"%f",dlye02); 					pclose(wj2); 					sfjdt01(); 				} 				else 				{ 					printf("您没有银行卡里没有这么多钱!"); 					main(); 				} 			} 			else if(yhczdfzf02=='n') 			{ 				jdt(); 				main(); 			} 		} 		else if(czzx02==2) 		{ 			main(); 		} 		else 		{ 			printf("您的输入有误,请确认后在输入!"); 			system("pause>null&&cls"); 		} 	} }

user: user-0
content: //话费余额函数 void hfye01() { 	int czzx02; 	int yhczdf02; 	char yhczdfzf02; 	int yhye02; 	float dlye02; 	FILE *wj1; 	FILE *wj2; 	wj1=fopen("yhjr01.txt","r"); 	fscanf(wj1,"%d",&yhye02); 	pclose(wj1); 	wj2=fopen("yh01hf.txt","r"); 	fscanf(wj2,"%f",&dlye02); 	pclose(wj2); 	while(1) 	{ 		system("cls"); 		printf("--------------------------------------------------------------------------------"); 		printf("--------------------------------|龙腾银行|--------------------------------------"); 		printf("---------------------------|通信余额查询或充值|---------------------------------"); 		printf("--------------------------------------------------------------------------------"); 		printf("--------------------|当前通信余额:                   元|------------------------"); 		printf("--------------------|当前银行卡上余额:               元|------------------------"); 		printf("--------------------------------------------------------------------------------"); 		printf("|1.充值|------------|请输入您的选项:         |--------------------------|2.返回|"); 		printf("--------------------------------------------------------------------------------"); 		printf("--------------------------------------------------------------------------------"); 		gotoxy(35,5); 		printf("%.2f",dlye02); 		gotoxy(39,6); 		printf("%d",yhye02); 		gotoxy(37,8); 		scanf("%d",&czzx02); 		if(czzx02==1) 		{ 			gotoxy(1,11); 			printf("\n\n"); 			printf("--------------------------------------------------------------------------------"); 			printf("---------------------------|请输入充值金额|-------------------------------------"); 			printf("---------------------------|            元|-------------------------------------"); 			printf("--------------------------------------------------------------------------------"); 			printf("---------------------------|y=确认充值    |-------------------------------------"); 			printf("---------------------------|n=我不想充了  |-------------------------------------"); 			printf("--------------------------------------------------------------------------------"); 			printf("-------------------|请输入您的选项(y/n):              |-------------------------"); 			printf("--------------------------------------------------------------------------------"); 			gotoxy(29,15); 			fflush(stdin); 			scanf("%d",&yhczdf02); 			gotoxy(41,20); 			fflush(stdin); 			scanf("%c",&yhczdfzf02); 			if(yhczdfzf02=='y') 			{ 				if(yhye02>yhczdf02) 				{ 					yhye02=yhye02-yhczdf02; 					wj1=fopen("yhjr01.txt","w"); 					fprintf(wj1,"%d",yhye02); 					pclose(wj1); 					dlye02=(dlye02+(float)(yhczdf02)); 					wj2=fopen("yh01hf.txt","w"); 					fprintf(wj2,"%f",dlye02); 					pclose(wj2); 					hfjdt01(); 				} 				else 				{ 					printf("您没有银行卡里没有这么多钱!"); 					main(); 				} 			} 			else if(yhczdfzf02=='n') 			{ 				jdt(); 				main(); 			} 		} 		else if(czzx02==2) 		{ 			main(); 		} 		else 		{ 			printf("您的输入有误,请确认后在输入!"); 			system("pause>null&&cls"); 		} 	} }