Files
Coleman-Code/SDrive/classwork/mod1/DebugFive2.java
T
Amrit Panesar 6dd63cc439 Archives from S:\ Drive
Good to keep around methinks
2015-04-01 21:23:15 -07:00

23 lines
413 B
Java

public class DebugFive2
// Prints odd numbers
// Prints new line after every 10
{
public static void main(String[] args) throws InterruptedException
{
int num, count = 0;
for(num = 1; num <= 100; num += 2)
{
System.out.print(" " + num);
++count;
if(count == 10)
{
count = 0;
System.out.println();
}
}
System.out.println("End of odd numbers");
}
}