Assignment #88 and Adding Values

Code

     //Name: Mark Katz
    ///Period: 6
    ///Program Name: Adding Values
    ///File Name: adding.java
    ///Date Finished: 11/10/15 
import java.util.Scanner;    
public class adding
{
    public static void main( String[] args )
    {

        Scanner keyboard = new Scanner(System.in);
        
        int choice, total;
        
        System.out.print( "Number: ");
        choice = keyboard.nextInt();
        
        total = 0;
        
        for ( int x = 1; x <= choice; x++ )
        {
            System.out.println( x + " ");
            total = total + x;
        }
        
        System.out.println( "The sum is " + total );
        
    }
}

            
           
    

Picture of the output

Assignment88