工作时间:7月5日 8:00-11:00 14:00-17:00
工作内容:
完成组长大程序验收
学习Oracle数据库架构
代码:
#include <fstream> #include <iostream> #include <stdio.h> #include <stdlib.h> using namespace std; void menu() { cout << "************菜单************" << endl << endl << " 1------20223766-郑盾" << endl << endl << " 2------20223768-李健龙" << endl << endl << " 3------20224059-王昊烜" << endl << endl << " 4------20223824-白卓冉" << endl << endl << " 5------20223918-刘霖" << endl << endl << " 0------退出 " << endl << endl << "请选择:" << endl; return; } void menu1() // 子菜单1 { cout << "项目1:7-3 修建道路" << endl << "项目2:7-6 散列表查找" << endl << "项目3:7-7 平衡二叉树的根" << endl << "项目4:7-13 中缀表达式转换为后缀表达式并求值" << endl << "0------退出 " << endl << "请选择:" << endl; return; } void menu2() // 子菜单2 { cout << "项目1:6-2 最短路径(迪杰斯特拉算法)" << endl << "项目2:6-4 希尔排序的实现" << endl << "项目3:7-4 先序和中序构造二叉树" << endl << "项目4:7-14 矩阵运算" << endl << "0------退出 " << endl << "请选择:" << endl; return; } void menu3() // 子菜单3 { cout << "项目1:6-3 最短路径(弗洛伊德算法)" << endl << "项目2:7-8 任务调度的合理性" << endl << "项目3:7-9 老板的作息表" << endl << "项目4:7-15 列出连通集" << endl << "0------退出 " << endl << "请选择:" << endl; return; } void menu4() // 子菜单4 { cout << "项目1:6-1 最小生成树(普里姆算法)" << endl << "项目2:7-2 关键路径 " << endl << "项目3:7-10 寻找大富翁" << endl << "项目4:7-16 重排链表" << endl << "0------退出 " << endl << "请选择:" << endl; return; } void menu5() // 子菜单5 { cout << "项目1:7-1 jmu-ds-实现KMP" << endl << "项目2:7-5 哈夫曼编码译码 " << endl << "项目3:7-11 二路归并排序" << endl << "项目4:7-12 链式基数排序" << endl << "0------退出 " << endl << "请选择:" << endl; return; } int main() { int flag = 0, dddd; menu(); cin >> flag; while (flag != 0) { switch (flag) { case 1: { int n = 0, m = 0; menu1(); cin >> n; while (n) { switch (n) { case 1: system("7_3.exe"); cout << endl; break; case 2: system("7_6.exe"); cout << endl; break; case 3: system("7_7.exe"); cout << endl; break; case 4: system("7_13.exe"); cout << endl; default: m = 0; break; } if (m == 0) n = 0; else { menu1(); cin >> n; } } cout << "返回到主程序中" << endl; break; } case 2: { int n = 0, m; menu2(); cin >> n; while (n) { switch (n) { case 1: system("6_2.exe"); cout << endl; break; case 2: system("6_4.exe"); cout << endl; break; case 3: system("7_4.exe"); cout << endl; break; case 4: system("7_14.exe"); cout << endl; default: m = 0; break; } if (m == 0) n = 0; else { menu2(); cin >> n; } } cout << "返回到主程序中" << endl; break; } case 3: { int n = 0, m; menu3(); cin >> n; while (n) { switch (n) { case 1: system("6_3.exe"); cout << endl; break; case 2: system("7_8.exe"); cout << endl; break; case 3: system("7_9.exe"); break; case 4: system("7_15.exe"); cout << endl; default: { m = 0; break; } // break; } if (m == 0) { n = 0; break; } else { menu3(); cin >> n; } } cout << "返回到主程序中" << endl; break; } case 4: { int n = 0, m; menu1(); cin >> n; while (n) { switch (n) { case 1: system("6_1.exe"); cout << endl; break; case 2: system("7_2.exe"); cout << endl; break; case 3: system("7_10.exe"); cout << endl; break; case 4: system("7_16.exe"); cout << endl; default: m = 0; break; } if (m == 0) n = 0; else { menu4(); cin >> n; } } cout << "返回到主程序中" << endl; break; } case 5: { int n = 0, m; menu5(); cin >> n; while (n) { switch (n) { case 1: system("7_1.exe"); cout << endl; break; case 2: system("7_5.exe"); cout << endl; break; case 3: system("7_11.exe"); cout << endl; break; case 4: system("7_12.exe"); cout << endl; default: m = 0; break; } if (m == 0) n = 0; else { menu5(); cin >> n; } } cout << "返回到主程序中" << endl; break; } default: { dddd = 0; break; } } if (dddd == 0) flag = 0; else { menu(); cin >> flag; } } return 0; }View Code
标签:24,case,exe,cout,while,system,switch,软件工程,暑假 From: https://www.cnblogs.com/kuandong24/p/18288483