C Program to generate even numbers upto n

#include<stdio.h>
int main()
{
    int n,i;
    printf("enter the number \n");
    scanf("%d",&n);
    printf("The even number series is:\n");
    for(i=0;i<=n;i=i+2)
    {
        printf("%d\t",i);
    }
}

Comments

Post a Comment