help plllsss.

Write your question here.
pls help me im having an error after executing it
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#include<iostream>
#include<string>
using namespace std;
void main()
{
char choice,choice2;
int ca=0,cb=0,cc=0,tv=0;
string sa="FPJ",sb="Roco",sc="GMA";

do
{
cout<<"\t PRESIDENTIAL ELECTIONS\n\n";
cout<<"Candidates \n\n";
cout<<"<A>FPJ\t<B>Roco\t<C>GMA \n";
cout<<"-----------------------\n";
cout<<"Enter <v>vote <r> result and <q> quit : ";
cin>>choice2;
if (choice2=='v')
{switch(choice)
{cout<<"Enter your vote:";
cin>>choice;
case 'A':
case 'a':
ca++;
break;
case 'B':
case 'b':
cb++;
break;
case 'C':
case 'c':
cc++;
break;
}
}
else if (choice2=='r')
{
cout<<"\t Presidential Elections\n\n";
cout<<"Candidates:"<<"\t results:"<<"\n\n";
cout<<"<A>FPJ : "<<ca<<"\n";
cout<<"<B>Roco : "<<cb<<"\n";
cout<<"<C>GMA : "<<cc<<"\n\n";
tv=ca+cb+cc;
cout<<"Total Votes : "<<tv<<"\n";
//place "and the winner is : <name> here//
}
} while (choice !='q');
}
Last edited on
maybe his a colleague with the same problem
Last edited on
Topic archived. No new replies allowed.