Advertisement
SECT19N

Chapter 2 Zoom

Oct 18th, 2023
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.88 KB | Source Code | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Main {
  4.     public static void main(String[] args) {
  5.         //for with break & continue
  6.         for (int i = 0; i < 10; i++) {
  7.             if (i == 3) {
  8.                 continue; //replace with break;
  9.             }
  10.  
  11.             System.out.println(i);
  12.         }
  13.        
  14.         //passed, failed and bonus homework.
  15. //        Scanner sc = new Scanner(System.in);
  16. //        int Passed = 0, Failed = 0;
  17. //
  18. //        for (int i = 0; i < 10; i++) {
  19. //            int POF = sc.nextInt();
  20. //
  21. //            if (i == 1) {
  22. //                Passed++;
  23. //            } else {
  24. //                Failed++;
  25. //            }
  26. //        }
  27. //
  28. //        System.out.println("Passed: " + Passed);
  29. //        System.out.println("Failed: " + Failed);
  30. //
  31. //        if (Passed > 8) {
  32. //            System.out.println("Bonus to instructor");
  33. //        }
  34.     }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement