bakks 0 Newbie Poster

i gto some prob to create this c++..
my Qs
this year the club will have an election by assuming that this club have 236 members where 3 will be the candidate of a club president. every member will vote only 1 candidate using the following code :
candidate code
Armin A
Ben B
Kristen K

if the member votes other than above code, then the vote is cancelled. write a program that can read code of vote for each member. reading process will ONLY can be terminated when code O is entered. Your program should be able to display the following analysis :

a. Number of votes for each candidate
b. determine the candidate that win the election


HERE MY C++

#include<iostream.h>
#include<conio.h>

main()
{
int A=0,B=0,K=0;
char code;
if (code =='A')
cout<<"Armin"<<endl;
if (code =='B')
cout <<"Ben"<<endl;
if (code =='K')
cout <<"Kristen"<<endl;
if (code == 'O')
cout << "No candidate"<<endl;
cout << "Enter code:"<<endl;
cin >> code;


while (code != 'O')
{
if (code == 'A');
{
  A= code + A;
}
if (code == 'B');
{
  B= code + B;
}
if (code == 'K');
{
  K= code +K;
}
char total;
 for (total = 0; total <=233; total++)
 cout<< total <<endl;
 total = total + A + B + K;
 {
 

 }
 }
getch();
}

I STILL CANT GOT THE OUTPUT..WHERE THE PROBLEM...

THANKS..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.