package ru.job4j.loop;

/**
* Counter.
*
* @author Sergey Indyukov (onl.ont@mail.ru)
* @version $Id$
* @since 0.1
*/

public class Counter {
/** Method area.
* @param start первый аргумент
* @param finish второй аргумент
* @return sum
*/
public int add(int start, int finish) {
		int sum;
		if (start % 2 == 0) {
			for (int i = start; i <= finish; i += 2) {
				sum += i;
			}
		} else {
			for (int i = start + 1; i <= finish; i += 2) {
				sum += i;
			}
		}
		return sum;
	}
}
@@ -286,33 +286,8 @@
 um;%0A
-%09%09if (start %25 2 == 0) %7B%0A%09
 %09%09fo
@@ -334,86 +334,26 @@
 %0A%09%09%09
-%09sum += i;%0A%09%09%09%7D%0A%09%09%7D else %7B%0A%09%09%09for (int i = start + 1; i %3C= finish; i += 2
+if (i %25 2 == 0
 ) %7B%0A
-%09
 %09%09%09s

task 192