public static int num(int a,int b) { int result = 0; for(int i = a;i<b;i++){ result = result+i; } return result; }