Prog 124: Summoning Three Numbers
//Name: Ilana Levy
//Period: 5
//Program Name: Summoning Three Numbers
//File Name: summonThree.java
//Date Finished: 2/18/2016
import java.util.Scanner;
import java.io.File;
public class summonThree
{
public static void main( String[] args )throws Exception
{
System.out.print( "Reading numbers from file \"3nums.txt.\" . . . ");
Scanner inFile = new Scanner( new File( "3nums.txt" ) );
int a, b, c;
a = inFile.nextInt();
b = inFile.nextInt();
c = inFile.nextInt();
System.out.println( "done.\n" + a + " + " + b + " + " + c + " = " + (a + b + c));
}
}