Tuesday, November 07, 2006

Voting Day

There seems to be a lot of trouble getting electronic voting machines to work. So I've decided that, in the interest of the nation, I would be so magnanimous as to write the code required to tally votes. I'll even put it out there for free!

It took me all of five minutes to write it, of which three was trying to remember BASIC from 10th grade.

Here it is, in all its glory:

R = 0
D = 0
CC = 0
G = 0
CL = 0
10 CLS
PRINT "Please vote for Senator."
PRINT "1) Alan Schlesinger, R"
PRINT "2) Ned Lamont, D"
PRINT "3) Timothy A. Knibbs, CC"
PRINT "4) Ralph Ferucci, G"
PRINT "5) Joseph Lieberman, CL"
PRINT "6) Show tally"
INPUT "number plz"; sen
ON sen GOTO 711, 712, 713, 714, 715, 790
711 R = R + 1
GOTO 10
712 D = D + 1
GOTO 10
713 CC = CC + 1
GOTO 10
714 G = G + 1
GOTO 10
715 CL = CL + 1
GOTO 10
790 PRINT " R D CC G CL"
791 PRINT R, D, CC, G, CL
799 END

So there. If I can do that, why are they having so much trouble with the machines?

1 Comments:

Anonymous Anonymous said...

My program would be better... hahahaha!!

8/11/06 16:07  

Post a Comment

<< Home