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 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173
|
int VO, y, z, x, a, b, c, d, e, f, g, h;
char NA, FA, A, B, C, D, E;
z=1;
x=0;
y=0;
a=0;
b=0;
c=0;
d=0;
e=0;
do
{
system("color 70");
printf("\n________________________________________________________________________________\n\n");
printf("\nWelcome to the Presidential Election 2016!\n\n");
printf("\nVote NOW!\n\n");
printf("\n________________________________________________________________________________\n\n");
printf("\n\n Vote for Clementine Berkowitz - President");
printf("\n Background:");
printf("\n Starting out as an orphan in the aftermath of the demise of her parents, \n Clementine Haynes Berkowitz managed to climb");
printf("\n the ranks of law-enforcement, becoming one of the best detectives in the country. \n Seeing this as an");
printf("\n an opportunity to inspire others, Clementine is determined to lead the nation \n to a bright future..");
printf("\n\n There's always a light at the end of the tunnel. - Parker Chapman, 2016");
printf("\n________________________________________________________________________________\n\n");
printf("\n\n Vote for Parker Chapman - President");
printf("\n Background:");
printf("\n Born from an impoverish family, Parker Roycelann Chapman \n found success after landing a scholarship in Harvard.");
printf("\n After hitting it big time as the district attorney of Metro Manila, \n Parker decided that from that point on,");
printf("\n he should dedicate his entire life in serving the country.");
printf("\n\n All things are possible through God! - Parker Chapman, 2016");
printf("\n________________________________________________________________________________\n\n");
printf("\n\n Vote for Stanley DeMille - President");
printf("\n Background:");
printf("\n Not a stranger to intense controversy, Stanley Holbrooke-Quentin DeMille \n was infamous for allegely being involved");
printf("\n in the previous administration's Infinity Fund Scam. Being a man of ambition, \n Stanley believes in second chances, and");
printf("\n he is aiming to clean-up the sins of the past!");
printf("\n\n Nothing is ever set in stone! - Stanley DeMille, 2016");
printf("\n________________________________________________________________________________\n\n");
printf("\n\n Vote for Michael Frankleiss - President");
printf("\n Background:");
printf("\n At the age of thirteen, Michael Johns Frankeleiss had a fascination \n for law. At the same age, he was bullied.");
printf("\n Now at the age of twnety-one, Michael is one of the brightest lawyers around. \n With the nation's crime wave at");
printf("\n an all-time high, Michael is now aiming to eliminate the criminal element!.");
printf("\n\n I am no hero, but I'm here to save the day! - Michael Frankleiss, 2016");
printf("\n________________________________________________________________________________\n\n");
printf("\n\n Vote for Erin Goodchild - President");
printf("\n Background:");
printf("\n By far, the youngest among all candidates, Erin L. Goodchild believes \n in the concept of transitivity ever.");
printf("\n since she started working in the world of journalism. Now, the country \n needs a leader who can stand for truth,");
printf("\n regardless of circumstance, and Erin is the right woman for the job!.");
printf("\n\n When the sun goes down, be a light of your own. - Erin Goodchild, 2016");
printf("\n________________________________________________________________________________\n\n");
printf("Enter Number of Voters: ");
scanf("%d",&VO);
while(z<=VO)
{
printf("\nVoter Number %d, who will you vote for?",z);
scanf("%s",&NA);
while(NA!=0)
{
if(NA=='A' || 'a')
{
a++;
}
else if(NA=='B' || 'b')
{
b++;
}
else if(NA=='C' || 'c')
{
c++;
}
else if(NA=='D' || 'd')
{
d++;
}
else if(NA=='E' || 'e')
{
e++;
}
else
{
printf("Invalid Vote!");
}
}
for(x=0; x<a; x++);
{
printf("Clementine Berkowitz");
printf("*");
}
for(y=0; y<b; y++);
{
printf("Parker Chapman");
printf("*");
}
for(f=0; f<c; f++);
{
printf("Stanley DeMille");
printf("*");
}
for(g=0; g<d; g++);
{
printf("Michael Frankleiss");
printf("*");
}
for(h=0; h<e; h++);
{
printf("Erin Goodchild");
printf("*");
}
if(a > b && b > c && c > d && d > e)
{
printf("\nClementine Berkowitz wins by %d votes.",x);
}
else if(b > c && c > d && d > e && e > a)
{
printf("\nParker Chapman wins by %d votes.",x);
}
else if(c > d && d > e && e > a && a > b)
{
printf("\nStanley DeMille wins by %d votes.",x);
}
else if(d > e && e > a && a > b && b > c)
{
printf("\nMichael Frankleiss wins by %d votes.",x);
}
else if(e > a && a > b && b > c && c > d)
{
printf("\nErin Goodchild wins by %d votes.",x);
}
z++;
}
printf("Would you like to vote again? (Y/N)");
scanf("%s",&FA);
}
while(FA == 'Y' || FA == 'y');
system("cls");
printf("Thank you for voting!");
getche();
}
|