Skip to content

Instantly share code, notes, and snippets.

@farhanpro
Last active March 27, 2019 09:57
Show Gist options
  • Save farhanpro/32fca4196c7e77f2aaf52cb9925cce9c to your computer and use it in GitHub Desktop.
Save farhanpro/32fca4196c7e77f2aaf52cb9925cce9c to your computer and use it in GitHub Desktop.
package com.company;
public class Main {
public static void main(String[] args) {
int b = 4;
int End_number = 20;
while (b <= End_number) {
b++;
if (!Is_Even(b)) {
continue;
}
System.out.println("Even numbers are : " + b);
}
}
public static boolean Is_Even(int number){
if ((number % 2) == 0) {
return true;
} else {
return false;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment