#include <stdio.h>
    
    int main() {
        int age;
        printf("Enter the age of candidate : ");
        scanf("%d", &age);
        switch (age){
            case 18:
                printf("\nYou are not Elegible for Voting");
                break;
            case 20:
                printf("\nYou are Elegible For Voting");
            default:
        printf("\nEnter correct age(only age 18 and age 20 are valid)");
            
        }
    
        return 0;
    }
    

Embed on website

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