/* Jessica Miller, CSE 142 This program reads input from a file containing polling results for the WA senatorial race and reports how many votes each candidate is expected to get. */ import java.util.*; import java.io.*; public class WAElections { public static void main(String[] args) throws FileNotFoundException { Scanner fileInput = new Scanner(new File("wapolls.txt")); int murray = 0; int rossi = 0; while (fileInput.hasNext()) { if (fileInput.hasNextInt()) { murray += fileInput.nextInt(); rossi += fileInput.nextInt(); } else { fileInput.next(); } } System.out.println("Murray: " + murray + " votes"); System.out.println("Rossi: " + rossi + " votes"); } }