Write a program to input age of any person and check he is eligible for voting or not.
In this program we input age of any person and check he is eligible for voting or not means we input a number by user and check number is greater than and equal to 18 then he is eligible for voting else not. So let's start #include<stdio.h> #include<conio.h> void main() { int a; clrscr(); printf("Enter age of person="); scanf("%d",&a); if(a>=18) printf("\nEligible for voting"); else printf("\nNot eligible for voting"); getch(); } RELATED EXAMPLES Write a program to input age of an employee and check he is retired or working . Write a program to input a number and check number is odd or even. Write a program to input two number and find smallest number . Write a program to input two number and find highest number. Share and Comment. Follow for recently updates.
Comments
Post a Comment