Assignemnt: Program #88 and adding values with for loops 

Code
/// Name: Yordan Rashkov
/// Period: 7
/// Program Name: adding values with for loops 
/// File Name: addingvalues.java
/// Date Finished: 3/01/2016

import java.util.InputMismatchException;
import java.util.Scanner;

public class addingvalues
{

	public static void main(String[] args)
	{
		Scanner keyboard = new Scanner(System.in);
		int number = 0;
		int t = 0;

		try {
			System.out.print(" #: ");
			number = keyboard.nextInt();
		} catch (InputMismatchException var5) {
			System.out.println("Error with Input!");
		}

		System.out.println();

		for(int i = 0; i < number; ++i) {
			System.out.print(i + 1 + " ");
			t += i + 1;
		}

		System.out.println();
		System.out.println("The sum is " + t);
	}
}