#include<stdio.h>
int even(int n){
    int i=0;
    printf("Even number :\n");
    for(i=1;i<=n;i++){
        if(i%2==0){
            printf("%d\n",i);
        }
    }
}

int odd(int n){
    int j=0;
    printf("Odd number :\n");
    for(j=1;j<=n;j++){
        if(j%2!=0){
            printf("%d\n",j);
        }
    }
}

int main(){
    int n=10;
    even(n);
    odd(n);
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: