Nation Bulletin

Aman Land Election Software Reveal

Yeah you can use it.

By ElectroPoll
02/12/2024 07:05 pm
Updated: 02/12/2024 07:05 pm

  1
Share On:   

The National Election Commission Of Senate changed its name to ElectroPoll in order to support it's new electric and definately not rigged system of election CyberPoll. Well the code is as following, you have to use an online C compiler and also you need to enter the simulation number of each person. It is basically how much people support that guy out of ten people. You can change total seats by just changing a couple lines here and there. My nation's senate has 800 seats so it will stay the same. And yeaaahhhh.....

Oh sorry this is the code and i made it in just 4 hours:

#include <stdio.h>
#include <stdlib.h>
#include <time.h>

int main() {
// Variables to store candidate names, simulation numbers, and vote results
char candidateNames[4][30];
int simNo[4];
int votes[4];

// Total number of votes per IS number based on ranges
int votesPerIS;

// Seed for random number generation
srand(time(NULL));

// Loop through IS numbers from 1 to 800
for (int isNumber = 1; isNumber <= 800; isNumber++) {

// Set votesPerIS based on the specified ranges
if (isNumber >= 1 && isNumber <= 100) {
votesPerIS = 1440;
} else if (isNumber >= 101 && isNumber <= 200) {
votesPerIS = 1370;
} else if (isNumber >= 201 && isNumber <= 300) {
votesPerIS = 1330;
} else if (isNumber >= 301 && isNumber <= 400) {
votesPerIS = 1380;
} else if (isNumber >= 401 && isNumber <= 500) {
votesPerIS = 1350;
} else if (isNumber >= 501 && isNumber <= 600) {
votesPerIS = 1270;
} else if (isNumber >= 601 && isNumber <= 700) {
votesPerIS = 1400;
} else if (isNumber >= 701 && isNumber <= 800) {
votesPerIS = 1100;
}

// Input candidate names
printf("\nIS %d - Enter candidate names:\n", isNumber);
for (int i = 0; i < 4; i++) {
printf("Candidate %d: ", i + 1);
scanf("%s", candidateNames[i]);
}

// Input simulation numbers for each candidate
printf("IS %d - Enter simulation numbers for each candidate (sum should be 10):\n", isNumber);
for (int i = 0; i < 4; i++) {
printf("%s: ", candidateNames[i]);
scanf("%d", &simNo[i]);
}

// Check if the sum of simulation numbers is 10
int sum = 0;
for (int i = 0; i < 4; i++) {
sum += simNo[i];
}

if (sum != 10) {
printf("Error: Simulation numbers do not add up to 10. Exiting program.\n");
return 1;
}

// Calculate and display vote results
printf("Vote Results for IS %d:\n", isNumber);
for (int i = 0; i < 4; i++) {
// Generate random votes proportional to simulation numbers
votes[i] = (simNo[i] * votesPerIS) / 10 + rand() % (votesPerIS / 40);
printf("%s: %d votes\n", candidateNames[i], votes[i]);
}

// Check if totalVotes is less than votesPerIS and distribute the remaining votes
int totalVotes = votes[0] + votes[1] + votes[2] + votes[3];
if (totalVotes < votesPerIS) {
for (int i = 0; i < 4; i++) {
votes[i] += ((votesPerIS - totalVotes) / 4);
}
}

// Display the final results for IS
printf("Final Results for IS %d:\n", isNumber);
for (int i = 0; i < 4; i++) {
printf("%s: %d votes\n", candidateNames[i], votes[i]);
}
}

return 0;
}

Replies

Posted February 12, 2024 at 2:09 pm

guys caution it will not work with double names only enter first name , i forgot to fixthe bug yikes

 

  2