#include <iostream.h>
#include <windows.h>
#include <conio.h>
int count = 0; //Общее кол-во голосов
int voices[8]; //Массив из голосов кандидатов
int GetCandidat()
{
for (int i = 0; i < 8; i++)
{
if (voices[i] > 0.5 * count)
{
cout<<"pobedil kandidat s nomerom %i"<<endl;
return i;
}
}
return -1;
}
void main()
{
for (int i = 0; i < 8; i++)
{
Cin>>"%i", &voices[i];
count += voices[i];
}
if (GetCandidat() == -1)
cout<<"nikto ne pobedil"<<;
}
getch();
}