C program to print all even numbers of the given range





C program to print all even numbers of the given range


#include<stdio.h>
int main(){

    into min,max;

    printf("Enter min and max even numbers respectively: ");
    scanf("%d %d",&min,&max);

    for(i=min;i<=max;i=i+2){
        printf("%d ",i);
    }

    return 0;
}


3 comments:

Ratul Ahmed said...

i is not declared it should be like this
int min,max,i;

Anonymous said...

i is not declared (!)

Unknown said...

it is a control variable it is always attached with program