Question #260828

10. Using the online compiler

• Write a program using a for loop that counts upwards from 0 to 100 in steps of 2.



Expert's answer


#include <stdio.h>

int main() {


    for (int i=0; i<=100; i+=2) {
        printf("%d\n", i);
    }
    
    return 0;
}
LATEST TUTORIALS
APPROVED BY CLIENTS