Advertisement
mmayoub

Ex05, 05.06.2021

Jun 5th, 2021
1,116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.28 KB | None | 0 0
  1. public class Ex05 {
  2.  
  3.     public static void main(String[] args) {
  4.  
  5.         // * * * method 1
  6.         for (int i = 201; i <= 500; i += 2) {
  7.             System.out.println(i);
  8.         }
  9.  
  10.         // method 2
  11.         for (int i = 200; i <= 500; i++) {
  12.             if (i % 2 == 1) {
  13.                 System.out.println(i);
  14.             }
  15.         }
  16.     }
  17.  
  18. }
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement