Assignemnt #124 Summing Three Numbers
Code
///Name: Prooz Fereydouni
///Period: 7
///Project Name: Summing Three Numbers
///File Name: STN.java
///Date: 5/28/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 a = fileIn.nextInt();
int b = fileIn.nextInt();
int c = fileIn.nextInt();
int sum = a + b + c;
System.out.println(a + " + " + b + " + " + c + " = " + sum);
}
}
Picture of the output