Last active
March 27, 2019 09:57
-
-
Save farhanpro/32fca4196c7e77f2aaf52cb9925cce9c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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