import java.util.Scanner; // program uses class Scanner

public class BPIH4E2
{
     // main method begins execution of Java application
     public static void main( String args[] )
     {            
        Scanner input = new Scanner( System.in );            
        int number1; // first number to add    
        int number2;  //last number to add      
        int sum=0; // sum of number1 and number2
         System.out.print( "Enter the first number: " ); // prompt
        number1 = input.nextInt(); // read first number from user
         System.out.print( "Enter the second number: " ); // prompt
        number2=input.nextInt();
        int i=number1;
        while(i<=number2)
        { sum += i; // add numbers
          i++;
        }  
        System.out.printf( "Sum from %d to %d = %d \n", number1,number2,sum ); // display sum
     } // end method main
} // end class BPIH4E1
