C program to detrermine a candidate’s age is eligible for casting the vote or not.
I have used DEV-C++ compiler for debugging purpose. But you can use any C programming language compiler as per your availability.
printf("Input the age of the candidate : ");
if (Candiateage < 18)
printf("Sorry, You are not eligible to caste your vote.\n");
printf("You would be able to caste your vote after %d year.\n", 18-Candiateag);
printf("Congratulation! You are eligible for casting your vote.\n");
Input the age of the candidate :16
Sorry, You are not eligible to caste your vote.
You would be able to caste your vote after 2 year.
total answers (1)
start bookmarking useful questions and collections and save it into your
own study-lists, login now to start creating your own collections.