Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- //for with break & continue
- for (int i = 0; i < 10; i++) {
- if (i == 3) {
- continue; //replace with break;
- }
- System.out.println(i);
- }
- //passed, failed and bonus homework.
- // Scanner sc = new Scanner(System.in);
- // int Passed = 0, Failed = 0;
- //
- // for (int i = 0; i < 10; i++) {
- // int POF = sc.nextInt();
- //
- // if (i == 1) {
- // Passed++;
- // } else {
- // Failed++;
- // }
- // }
- //
- // System.out.println("Passed: " + Passed);
- // System.out.println("Failed: " + Failed);
- //
- // if (Passed > 8) {
- // System.out.println("Bonus to instructor");
- // }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement