Assignment #124 and Summing Three Numbers

Code

                        /// Name: Graham Pollock
                        /// Period: 5
                        /// Program Name: Summing Three Numbers
                        /// File Name: STN.java
                        /// Date Finished: 05/30/2016/

    import java.io.File;
    import java.util.Scanner;
    
    public class STN {
        
        public static void main(String[] args) throws Exception {
            
            Scanner fileIn = new Scanner(new File("3nums.txt"));
            
            int num1 = fileIn.nextInt();
            int num2 = fileIn.nextInt();
            int num3 = fileIn.nextInt();
            
            int sum = num1 + num2 + num3;
            
            System.out.println(num1 + " + " + num2 + " + " + num3 + " = " + sum);
        }
    }
    

Picture of the output

Assignment