Skip to content

Instantly share code, notes, and snippets.

@jatinkrmalik
Last active March 16, 2017 13:10
Show Gist options
  • Save jatinkrmalik/f5aebf1ea8d5336e10565b14fbd27fc2 to your computer and use it in GitHub Desktop.
Save jatinkrmalik/f5aebf1ea8d5336e10565b14fbd27fc2 to your computer and use it in GitHub Desktop.
How EVMs were hacking in recent Legislative Assembly Elections 2017 in India! :P
/*
Program: Hacking all EVMs enabling BJP to win.
Description: Well, Dev Jha asked for it. ¯\_(ツ)_/¯
Author: Jatin K Malik
Date: 16-03-2017 06:11:17 PM
*/
#include < iostream >
using namespace std;
int main(void) {
int voteBJP, voteBSP, voteINC, voteSP;
voteBJP = voteBSP = voteINC = voteSP = 0;
while (true) {
system("cls");
int vote;
char ch;
cout << "\n\t\t****Welcome to Legislative Assembly Elections 2017****\n";
cout << "\n>>>Please cast your vote from the following: \n";
cout << "\n\t1. Bharatiya Janata Party (BJP)\n\t2. Bahujan Samaj Party (BSP)\n\t3. Indian National Congress (INC)\n\t4. Samajwadi Party.\n\t5. None Of The Above (NOTA)\n\n>>>Enter your vote: ";
cin >> vote;
cout << "\nRegistering your vote....";
cout << "\nHacking all EVMs....";
switch (vote) {
case 1:
voteBJP++;
break;
case 2:
voteBJP++; // BSP? You sure don't mean BJP here?
break;
case 3:
voteBJP++; // Congress? Pagal hai bc!!
break;
case 4:
voteBJP++; // SP? Jo apne baap ka nahi hua, iss desh ka kya hoga :P
break;
case 5:
voteBJP++; // NOTA? LOL.
break;
default:
voteBJP++; // Galat dalta hai? Koina. Modi++!
break;
}
cout << "\n\n\t\t***Your vote has been casted!***\n\n";
cout << "\n----------------------------------------------------------\n";
cout << "\t\t****Voting results:****";
cout << "\n\t1. Bharatiya Janata Party (BJP):" << voteBJP << "\n\t2. Bahujan Samaj Party (BSP): " << voteBSP << "\n\t3. Indian National Congress (INC): " << voteINC << "\n\t4. Samajwadi Party.: " << voteSP << "\n\t5. None Of The Above (NOTA): NILL\n";
cout << "\t\t************************";
cout << "\n----------------------------------------------------------\n\n>>> Do you want to cast more votes? (Y/N)";
cin >> ch;
if (ch == 'n' || ch == 'N')
break;
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment