Problem Description
In a country named Differenzia the minors and senior citizens are not eligible to vote. Only people aged between 18 to 60 (both inclusive) are eligible to vote. Write a program to determine a person in Differenzia is eligible to vote.Test Case 1
Input (stdin)18
Expected OutputEligible
Test Case 2
Input (stdin)17
Expected OutputNot Eligible
Program
#include <stdio.h> int main() { int a; scanf("%d",&a); if(a>=18&&a<=60) printf("Eligible"); else printf("Not Eligible"); return 0; }
No comments:
Post a Comment
Note: only a member of this blog may post a comment.