Computer Science, asked by ishan0208, 5 months ago

Write a program in Basic-256 to accept the birth year of a person and check whether s/he is eligible

to vote or not. A person is eligible to vote only when s/he is 18 years or more.

Guidelines:

 Write an algorithm for the above problem.

 Open Basic-256 application.

 Use Input statement to accept birth year from the user and save it in the numeric variable.

 Calculate age = current year - birth year.

 Use the “if - else” condition to check whether age is greater than or equal to 18 and display
appropriate messages​

Answers

Answered by subhendra1123
0

Answer:

it's in c+++. and if you want in java tell me

Explanation:

#include<stdio.h>

#include<conio.h>

void main()

{

int age;

char name[50]; // or *name

clrscr();

printf("\n Type the Name of the candidate: ");

gets(name);

printf("\n Enter The Age : ");

scanf("%d",&age);

if(age>=18)

{

printf("\n %s is Eligible for Vote",name);

}

else

{

printf("\n %s is Not Eligible for Vote",name);

}

getch();

}

Similar questions