C program to find the candidate is eligible for voting.

 

C program

C PROGRAM

C program to find the candidate is eligible for voting

#include <stdio.h>
#include<conio.h>
void main()
{
  int b;
  clrscr();
  printf("Enter the age of the candidate \n");
  scanf("%d",&b);
  if(b>18)
  printf("the candidate is eligible for voting");
  else
  printf("the candidate is not eligible for voting");
  getch();
  }

OUTPUT :

Enter the age of the candidate 
21
the candidate is eligible for voting
Process finished.





No comments:

Post a Comment




Copyright Ⓒ 2022 | Mechpedia | All Right Reserved.