int n = 21, total = 0; // Do-while loop do { // Execution statements(Body of loop) // Here, the line will be printed even // if the condition is false total += n; n--; } while (n > 10); int x = 1; int sum = 0; // Exit when x becomes greater than 4 while (x <= 10 && sum < 100) { // summing up x sum = sum + x; // Increment the value of x for // next iteration x++; } System.out.println("Summation: " + sum); boolean flag = false; for (int i = 0; flag==false || i < 10; i++) { // If the number is even // skip and continue if (i % 2 == 0){ continue; } else{ // If number is odd, print it System.out.print(i + " "); if(i == 7){ flag = true; } } } int i = 0; while (flag == true){ if (i < 12){ System.out.println("i is smaller than 12 "); } else{ System.out.println("i is grater than 12 "); if (i %19 == 0){ break; } } } System.out.println("End of the program");