///Name: Luke Shin ///Period: 7 ///Project Name: add ///File Name: add.java ///Date: 01/16/2016 import java.util.Scanner; public class add{ public static void main(String[] args){ int value; int total=0; Scanner keyboard = new Scanner(System.in); System.out.print("Count to: "); value = keyboard.nextInt(); for ( int n=1; n <= value; n++){ System.out.print(n+" "); total += n; } System.out.println(); System.out.println("Total: "+total); } }