#include <stdio.h>
int main() {
for(int i = 20; i >= 10; i = i - 1) {
if(i%2 == 0) {
printf("%d,",i);
}
return 0;
20,18,16,14,12,10,
The integer starts at 20 and goes down by 1 point to 10.
The if statement checks if the remainder of i is 0 to print the even numbers only.
Answer:
int main(){
for (int i = 10; i < 21; i+=2){
printf("%d\\", i);
Step-by-step explanation:
i+=2 increments i by 2 starting with 10 so it prints out only even number
s
i < 21 because we also want to print out 20
1.6m questions
2.0m answers