Assignment #124 Summing Three Numbers

Code

    /// Name: Koosha Kimelman
    /// Period: 7
    /// Program Name: Summing Three Numbers
    /// File Name: ThreeNumbers.java
    /// Date Completed: 6/2/16
    
    import java.io.File;
    import java.util.Scanner;
    
    public class ThreeNumbers {
    
        public static void main(String[] args) throws Exception {
        
            int a, b, c, sum;
            
            Scanner fileIn = new Scanner(new File("3nums.txt"));
            
            a = fileIn.nextInt();
            b = fileIn.nextInt();
            c = fileIn.nextInt();
            sum = a + b + c;
            
            fileIn.close();
            
            System.out.println(a + " + " + b + " + " + c + " = " + sum);
        }
    }
    

Picture of the output

Assignment 124