Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Write a C++ program that will accept user input,

having the following variables, name, surname, date


of birth, address, gender, age and cellphone number.
The program must evaluate user age if he/she eligible
to vote or not, the person must be 18 years old to be
able to vote, if the person is younger than 18 the
program must also show how many year/s left for
him/her to vote…

Sample output data


Please enter your name: Samuel
Please enter your surname: Rametse
Please your date of birth (MM-DD-YYYY): May-15-2010
Please enter residential address: 2912 Sweet thorn street Pretoria 0001
Please enter gender: Male
Please enter your Age: 13
Please enter your cellphone number: 061017752

Name: Samuel
Surname: Rametse
Date of birth: 19 May 2010
Residential address: 2912 Sweet thorn street Pretoria 0001
Gender: Male
Age: 13
Contact number:061017752
Voting Status: Not eligible to vote age restriction
Years left to vote: 5 years

You might also like