Professional Documents
Culture Documents
OOP Assignment Cat 2
OOP Assignment Cat 2
class ballot
int candidate;
int vote[size];
int choice; //candidate you want to create for voting int vote[size];
int ballot[5];
int spoiltballot;
int i;
void getdisplay(void);
};
cin>>candidate;
int a,b,c,d,e;
a=0;
a=b=c=d=e;
cin>>vote[i];
switch(vote[i])
case 1:ballot[a];
a++;
break;
case 2:ballot[b];
b++;
break;
case 3:ballot[c];
c++;
break;
case 4:ballot[d];
d++;
break;
case 5:ballot[e];
e++;
break;
default : ++spoiltballot;
do
{
cout<<"\n\n\n\nChoices Available\n";
cout<<"\n7) EXIT\n";
cin>>choice;
switch(choice)
break;
break;
break;
break;
break;
break;
}
}
while(1);
int main()
ballot o1;
o1.getdisplay();