#include <cstdlib>
#include <iostream>
usingnamespace std;
int main()
{
//define variables
char letter = ' ';
int cfAndy = 0;
int cfBri =0;
int cfChuck=0;
char e = 'e';
// convert character to uppercase
letter = toupper(letter);
//equation
while (letter != e)
{
cout << "Enter A for Andy, B for Brianna, C for Chuck or E to exit: ";
cin >> letter;
if (letter='A')
{
cfAndy=cfAndy+1;
}
elseif (letter='B')
{
cfBri=cfBri+1;
}
elseif (letter='C')
{
cfChuck=cfChuck+1;
}
}
//Total votes
cout << "Number of votes for Andy: "<<cfAndy <<endl;
cout << "Number of votes for Brianna: "<<cfBri <<endl;
cout << "Number of votes for Chuck: "<<cfChuck <<endl;
//Determine ties
if (cfAndy=cfBri)
{
cout << "Andy and Brianna tied."<<endl;
}
elseif (cfAndy=cfChuck)
{
cout << "Andy and Chuck tied."<<endl;
}
else
{(cfBri=cfChuck);
cout << "Brianna and Chuck tied."<<endl;
}
system("pause");
return 0;
}