1. Insert the merge sort and buy the counter. have if it is the fastest ordering.
#include using std :: cout; using std :: cin; using std :: endl; using std :: boolalpha; int main () { int option; bool flag = false; // main menu do { system ("clear"); cout << "\ t \ tMAINMENU" << endl; cout << "1.) Option # 1" << endl; cout << "2.) Option # 2" << endl; cout << "3.) Option # 3" << endl; cout << "4.) Exit" << endl; cout << "Enter your option:"; cin >> option; switch (option) { Case 1: yes (flag == false) { system ("clear"); cout << "You are in option # 1" << endl; cout << "Press Enter to continue" << endl; cout << "Please type enter to continue"; cin.get (); cin.get (); flag = true; } plus {system ("clear"); cout << "enter the data again" << endl; flag = false; cout << "Please type enter to continue"; cin.get (); cin.get (); } to break; case 2: yes (flag == true) { system ("clear"); cout << "You are in option # 2" << endl; cout << "Press Enter to continue" << endl; cout << "Please type enter to continue"; cin.get (); cin.get (); } plus { system ("clear"); cout << "******* Error ******" << endl; cout << "Please go to option # 1 first and then continue" << endl; // system ("Pause"); cout << "Please type enter to continue"; cin.get (); cin.get (); } to break; case 3: yes (flag == true) { system ("clear"); cout << "You are in option # 3" << endl; cout << "Press Enter to continue" << endl; // system ("pause"); cout << "Please type enter to continue"; cin.get (); cin.get (); } plus { system ("clear"); cout << "******* Error ******" << endl; cout << "Please go to option # 1 first and then continue" << endl; // system ("Pause"); cout << "Please type enter to continue"; cin.get (); cin.get (); } to break; case 4: // program exit option WARNING system ("clear"); cout << "Exit Thank you for using this Program" << endl; cout << "Press Enter to continue" << endl; // system ("pause"); cout << "Please type enter to continue"; cin.get (); cin.get (); to break; default: system ("clear"); cout << "Bad option error try again" << endl; cout << "Press Enter to continue" << endl; // system ("pause"); cout << "Please type enter to continue"; cin.get (); cin.get (); to break; } // end of change system ("clear"); } while (option! = 4); } // ends main5
This is the only information I have. I would appreciate your help. Thank you