#include float numA = 0;float numB = 0;float temp = 0;void calc(){ printf("\n"); printf("======欢迎使用计算器====="); printf("\n"); printf("请输入第一个数:"); scanf("%lf",&numA) printf("请输入第二个数:"); scanf("%lf",&numB); printf("请输入你的选择:\n1加法运算\n,2减法运算\n,3乘法运算\n,4除法运算\n,5求余运算\n,6退出系统\n"); char choose = 0;scanf("%c",choose); temp = 0; switch (choose) { case '1': temp = numA + numB; break; case '2': temp = numA - numB; break; case '3': temp = numA * numB; break; case '4': temp = numA / numB; break; case '5': temp = (int)numA % (int)numB; break; case '6': .printf("已经成功退出系统!"); break; default: printf("输入错误,请重新输入!"); print("\n"); calc(); break; } }void login(){ printf("请系统登录输入密码:"); char password [100]=""; scanf("%s",&password) if (password=="admin") { calc(); }else{ printf("你输入的系统密码不正确,请重新输入!\n"); printf("\n"); login(); } } void main() { login(); printf("结果是:%lf",temp); }