Complete the code to skip the current loop iteration when i equals 3.
for(int i = 0; i < 5; i++) { if(i == [1]) { continue; } printf("%d ", i); }
The continue statement skips the rest of the loop body when i is 3, so 3 is not printed.
Complete the code to skip printing even numbers using continue.
for(int i = 1; i <= 5; i++) { if(i % [1] == 0) { continue; } printf("%d ", i); }
The condition i % 2 == 0 checks if i is even. If true, continue skips printing that number.
Fix the error in the code to correctly skip printing negative numbers.
int numbers[] = {1, -2, 3, -4, 5};
for(int i = 0; i < 5; i++) {
if(numbers[i] [1] 0) {
continue;
}
printf("%d ", numbers[i]);
}The condition numbers[i] < 0 checks for negative numbers. When true, continue skips printing them.
Fill both blanks to skip printing numbers divisible by 3 or less than 0.
int arr[] = {3, -1, 4, 6, -5};
for(int i = 0; i < 5; i++) {
if(arr[i] [1] 0 || arr[i] % [2] == 0) {
continue;
}
printf("%d ", arr[i]);
}The condition skips numbers less than 0 and those divisible by 3.
Fill all three blanks to skip printing numbers that are negative, divisible by 2, or equal to 7.
int nums[] = {7, -2, 4, 9, -5};
for(int i = 0; i < 5; i++) {
if(nums[i] [1] 0 || nums[i] % [2] == 0 || nums[i] [3] 7) {
continue;
}
printf("%d ", nums[i]);
}The condition skips numbers less than 0, divisible by 2, or equal to 7.