#include"main.h" void setting(int v){ char choice; do{ printf("\n\n\n\n\n\n\t\t\t\t设置\n\n"); printf("\t\t\t1.范围····> "); if(range==0) printf("100以内\n\n"); else printf("1000以内\n\n"); printf("\t\t\t2.运算符···> "); if(kind==0) printf("加减\n\n"); else printf("乘除\n\n"); printf("\t\t\t3.声音····> "); if(voice==0) printf("关\n\n"); else printf("开\n\n"); printf("\t\t\t4.返回菜单\n\n"); do{ //选择判断 choice=getch(); if(choice>='1'&&choice<='4'){ if(choice=='1'){ range++; range%=2; } if(choice=='2'){ kind++; kind%=2; } if(choice=='3'){ voice++; voice%=2; } if(voice==1) printf("\a"); break; }else printf("\n\t\t\t输入错误\n\n\t\t\t"); }while(choice!='4'); system("cls"); }while(choice!='4'); dif=0; if(range==1) dif+=2; if(kind==1) dif++; }