#include <iostream>
#include <iomanip>
#include<string>
#include<cstdlib>
using namespace std;
int main()
{
char choice;
string password = "jim";
string guess = "";
do
{
system("color F0");
system("CLS");
cout << "\n\n\n\n";
cout << setw(50) << "Voting Menu";
cout << endl << setw(40) << " George W. Bush" << ": 1 " ;
cout << endl << setw(40) << " John F. Kerry" << ": 2 ";
cout << endl << setw(40) << " EXIT" << ": 3 " << endl;
cout << endl << endl << setw(40) << "Please enter your choice :";
cin >> choice;
cin.get();
switch( choice)
{
case '1': system("CLS");
cout << "\n\n\n\n";
cout << setw(50) << "Thank you for voting. " << endl;
cin.get();
break;
case '2': system("CLS");
cout << "\n\n\n\n";
cout << setw(50) <<"Thank you for voting" << endl;
cin.get();
break;
case '3': system("CLS");
cout << "\n\n\n\n";
cout << setw(50) <<"Please enter supervisors password :" ;
cin >> guess;
if(guess == password)
{
cout << endl << endl << endl << setw(10) << ""
<< "Are you sure you want to quit and start counting votes? <Y/N> " << endl;
}
else
{
cin.get();
}
case '4': break;
}
}while( choice != '3');
return 0;
}
email me if you have any problems on
yb1pls@yahoo.co.uk