
public class InfiniteIterativeLoop {
	int sum(int n) {
		int result = 0;
		for(int i = 0; i < n; )
			result += i;
		return result;
	}

	int sumOfOdd(int n) {
		int result = 0;
		for(int i = 0; i < n; ) {
			if (i % 2 != 0)
				result += i;
		}
		return result;
	}
}

@@ -1,9 +1,8 @@
-%0A
 public c
@@ -63,32 +63,33 @@
 esult = 0;%0A%09%09for
+ 
 (int i = 0; i %3C 
@@ -90,17 +90,16 @@
 ; i %3C n;
- 
 )%0A%09%09%09res
@@ -129,16 +129,250 @@
 lt;%0A%09%7D%0A%0A
+%09int sumDoWhile(int n) %7B%0A%09%09int result = 0;%0A%09%09int i = 0;%0A%09%09do %7B%0A%09%09%09result += i;%0A%09%09%7D while (i %3C n);%0A%09%09return result;%0A%09%7D%0A%0A%09int sumWhileDo(int n) %7B%0A%09%09int result = 0;%0A%09%09int i = 0;%0A%09%09while (i %3C n) %7B%0A%09%09%09result += i;%0A%09%09%7D%0A%09%09return result;%0A%09%7D%0A%0A
 %09int sum
@@ -409,16 +409,17 @@
 0;%0A%09%09for
+ 
 (int i =
@@ -428,17 +428,300 @@
 ; i %3C n;
- 
+) %7B%0A%09%09%09if (i %25 2 != 0)%0A%09%09%09%09result += i;%0A%09%09%7D%0A%09%09return result;%0A%09%7D%0A%0A%09int sumOfOddDoWhile(int n) %7B%0A%09%09int result = 0;%0A%09%09int i = 0;%0A%09%09do %7B%0A%09%09%09if (i %25 2 != 0)%0A%09%09%09%09result += i;%0A%09%09%7D while (i %3C n);%0A%09%09return result;%0A%09%7D%0A%0A%09int sumOfOddWhileDo(int n) %7B%0A%09%09int result = 0;%0A%09%09int i = 0;%0A%09%09while (i %3C n
 ) %7B%0A%09%09%09i

add more test cases