I am trying to create a menu with borders. I am trying to have the cout statement inside of the menu border but it isn't producing right. what is the best way to have the cout inside of the menu #include "stdafx.h" #include "stdafx.h" #include #include #include #include #include #include #include #include #include #include #include "ConsoleApplication13.h" using namespace std; string donor_name; double donor_amount; int choice; int main() { cout << " \n\n ************************************************************" << endl; cout << " ** **" << endl; cout << " ** **" << endl; cout << " ** 1. Add a contributor. **" << endl; cout << " ** 2. Search and update contributor. **" << endl; cout << " ** 3. Display all Donor information. **" << endl; cout << " ** 4. Department Total. **" << endl; cout << " ** 5. Delete Donation. **" << endl; cout << " ** 6. Exit. **" << endl; cout << " ** **" << endl; cout << " ** **" << endl; cout << " ** **" << endl; cout << " ** **" << endl; cout << " ** Choose one: " <> donor_name; cout << "\nPlease enter amount donor contributed: \n"; cin >> donor_amount; cout << "\n\n=Donation to organization= \n"; cout << "\n1.)NHTS 2)PBL 3)PTK 4)SEA\n"; system("CLS"); goto here; case 2: cout << "==Search and update contributor=="; system("CLS"); goto here; case 3: cout << "==Display all donations=="; system("CLS"); goto here; case 4: cout << "==Total Contributions=="; system("CLS"); goto here; case 5: cout << "==Delete a donor donation=="; system("CLS"); goto here; case 6: exit(0); } system("pause"); system("CLS"); return 0; }
I am trying to create a menu with borders. I am trying to have the cout statement inside of the menu border but it isn't producing right. what is the best way to have the cout inside of the menu
#include "stdafx.h"
#include "stdafx.h"
#include <iostream>
#include <limits>
#include <cstdlib>
#include <ctime>
#include <string>
#include <vector>
#include <cctype>
#include <iterator>
#include <algorithm>
#include <cmath>
#include "ConsoleApplication13.h"
using namespace std;
string donor_name;
double donor_amount;
int choice;
int main()
{
cout << " \n\n ************************************************************" << endl;
cout << " ** **" << endl;
cout << " ** **" << endl;
cout << " ** 1. Add a contributor. **" << endl;
cout << " ** 2. Search and update contributor. **" << endl;
cout << " ** 3. Display all Donor information. **" << endl;
cout << " ** 4. Department Total. **" << endl;
cout << " ** 5. Delete Donation. **" << endl;
cout << " ** 6. Exit. **" << endl;
cout << " ** **" << endl;
cout << " ** **" << endl;
cout << " ** **" << endl;
cout << " ** **" << endl;
cout << " ** Choose one: " <<choice <<" **" << endl;
cout << " ************************************************************" << endl;
switch (choice)
{
here:
case 1:
cout << "\n===Record donor information===\n";
cout << "\nPlease enter the name of the donor: \n";
cin >> donor_name;
cout << "\nPlease enter amount donor contributed: \n";
cin >> donor_amount;
cout << "\n\n=Donation to organization= \n";
cout << "\n1.)NHTS 2)PBL 3)PTK 4)SEA\n";
system("CLS");
goto here;
case 2:
cout << "==Search and update contributor==";
system("CLS");
goto here;
case 3:
cout << "==Display all donations==";
system("CLS");
goto here;
case 4:
cout << "==Total Contributions==";
system("CLS");
goto here;
case 5:
cout << "==Delete a donor donation==";
system("CLS");
goto here;
case 6:
exit(0);
}
system("pause");
system("CLS");
return 0;
}
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images