///Name: Tyler Hart ///Period:5 ///Project Name: Adding Values With a For Loop ///File Name:SuperSum.java ///2/27/2016 import java.util.Scanner; public class SuperSum { public static void main( String[] args ) { Scanner key = new Scanner(System.in); System.out.println("count to: "); int t = key.nextInt(),s=0; for ( int n = 1 ; n <= t ; n = n+1 ) { s = s + n; System.out.print( n + " "); } System.out.println(""); System.out.println("The sum is " + s + "."); } }