#include <stdio.h>

int main() {
    int age;
    char Gen;
    printf("Enter the Gender of the Candidate(M/F):");
    scanf("%c",&Gen);
    printf("%c\n",Gen);
    if (Gen=='M')
    {printf("Enter the Age of the Candidate: ");
     scanf("%d",&age);
     if (age>=21)
     {printf("\nThe Candidate is Eligible for Marriage\n");
     }
     else
     {printf("\nThe Candidate is Nor Eligible for Marriage\n");
     }}

    else if (Gen=='F')
    {printf("Enter the Age of the Candidate: ");
     scanf("%d",&age);
     if (age>=18)
     {printf("\nThe Candidate is Eligible for Marriage\n");
     }
     else
     {printf("\nThe Candidate is Nor Eligible for Marriage\n");
     }
    }
}

Embed on website

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