public class ParameterTest {
  
    public static void main(String[] args) {
        System.out.printf("Summe von 7 + 4 + 8 + 2 = %d", add (7, 4 , 8, 2));
        System.out.printf("\nSumme von 23 + 24 + 25 = %d", add(23, 24, 25));
        System.out.printf("\nSumme von -10 + 20 = %d", add(-10, 20));
      
         }
     static int add(int ... i){
         int s = 0;
         for (int x : i )
             s += x;
         return s;
                
     }            

}


