Write a program to input age of a person and check whether he is eligible to vote or not.
Answers
Answered by
10
Answer:
Program: # input age age = int(input("Enter Age : ")) # condition to check voting eligibility if age>=18: status="Eligible" else: status="Not Eligible" print("You are ",status," for Vote.
REQUEST
Hope you Like
If liked Please as Brainliest
Answered by
6
If python this is the ans
Age = int(input(‘enter your age: ‘))
If Age >= 18:
Print(‘congrats you can vote’)
else:
Print(‘sorry but you cannot vote’)
In Java use this code with input as scanner and with brackets{}
Age = int(input(‘enter your age: ‘))
If Age >= 18:
Print(‘congrats you can vote’)
else:
Print(‘sorry but you cannot vote’)
In Java use this code with input as scanner and with brackets{}
Similar questions