Skip to content

Instantly share code, notes, and snippets.

@laurakelly
Created September 1, 2012 07:50
Show Gist options
  • Save laurakelly/3566731 to your computer and use it in GitHub Desktop.
Save laurakelly/3566731 to your computer and use it in GitHub Desktop.
print odd numbers in java
package main;
public class OddNumbers {
public static void main(String[] args){
for (int number = 0; number < 100; number++){
if (number % 2 != 0) {
System.out.println(number);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment