RyanAllarey

100 even/odd

Jan 9th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.30 KB | None | 0 0
  1. public class practice {
  2.     public static void main(String [] args){
  3.         for(int x = 0; x <= 100; x++){
  4.             if(x % 2 == 0){
  5.                 System.out.println(x + " even");
  6.             } else if(x % 2 == 1){
  7.                 System.out.println(x + " odd");
  8.             }
  9.         }
  10.     }
  11. }
Add Comment
Please, Sign In to add comment