Write a program that read names of two candidates as inputs, then asks you to enter the number of votes for each person, and then prints the the name of the winner. If it's a tie, it has to say so.
For instance, the dialog with the program may go like this (using prompts to read the data):
If it's a tie, print something like "Bart Simpson and Lisa Simpson got equal number of votes".
Write a program that uses a random number generator to "tell fortune":
Math.random()to generate a random number between 1 and 5 (inclusive)
style = "color: ..."for this)
Questions 13, 15, 16, 20 p 115.
Send all of your program files to me by e-mail. You may submit the written part in class or send it together with your problem set. Please send only ONE e-mail with your entire submission, make sure you include everything. Multiple e-mails with your homework may result in lower grade.Your programs will be graded not just on correctness, but also on the clarity of code. Appearance of the page and creativity may be taken into account.
The views and opinions expressed in this page are strictly those of the page author. The contents of this page have not been reviewed or approved by the University of Minnesota.