for ($x = 0; $x < 10; $x++) {
if ($x == 4) {
break;
}
echo "The number is: $x <br>";
}
#include <stdio.h>
int main() {
for (int x = 0; x < 10; x++) {
if (x == 4) {
break;
}
printf("The number is: %d\n", x);
}
return 0;
}
public class Main {
public static void main(String[] args) {
for (int x = 0; x < 10; x++) {
if (x == 4) {
break;
}
System.out.println("The number is: " + x);
}
}
}
for x in range(10):
if x == 4:
break
print(f"The number is: {x}")
The number is: 0
The number is: 1
The number is: 2
The number is: 3
The number is: 0
The number is: 1
The number is: 2
The number is: 3
The number is: 0
The number is: 1
The number is: 2
The number is: 3
The number is: 0
The number is: 1
The number is: 2
The number is: 3
<?php
$numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
foreach ($numbers as $number) {
switch ($number) {
case 2:
case 4:
case 6:
case 8:
continue;
}
echo "เลขคี่: $number\n";
}
?>
เลขคี่: 3
เลขคี่: 5
เลขคี่: 7
เลขคี่: 9
เลขคี่: 1
เลขคี่: 3
เลขคี่: 5
เลขคี่: 7
เลขคี่: 9
เลขคี่: 1
เลขคี่: 3
เลขคี่: 5
เลขคี่: 7
เลขคี่: 9
ผลไม้: apple
ผลไม้: cherry
ผลไม้: date
ผลไม้: fig
เลขคี่: 1
เลขคี่: 3
เลขคี่: 5
เลขคี่: 7
เลขคี่: 9
while(expr){
if (condition){
continue;
}
<?php
for ($x = 0; $x < 10; $x++) {
if ($x == 4) {
continue;
}
echo "The number is: $x <br>";
}
?>
#include <stdio.h>
int main() {
for (int x = 0; x < 10; x++) {
if (x == 4) {
continue;
}
printf("The number is: %d\n", x);
}
return 0;
}
public class Main {
public static void main(String[] args) {
for (int x = 0; x < 10; x++) {
if (x == 4) {
continue;
}
System.out.println("The number is: " + x);
}
}
}
for x in range(10):
if x == 4:
continue
print(f"The number is: {x}")
The number is: 1
The number is: 2
The number is: 3
The number is: 5
The number is: 6
The number is: 7
The number is: 8
The number is: 9
The number is: 1
The number is: 2
The number is: 3
The number is: 5
The number is: 6
The number is: 7
The number is: 8
The number is: 9
The number is: 1
The number is: 2
The number is: 3
The number is: 5
The number is: 6
The number is: 7
The number is: 8
The number is: 9
The number is: 1
The number is: 2
The number is: 3
The number is: 5
The number is: 6
The number is: 7
The number is: 8
The number is: 9