Our code uses string functions like string compare, string length , string copy, string concat to get details from user and display in a formatted manner of an virtual / digital id.
WORKING OF OUR CODE :-
-
It asks user to enter his/her first name and last name. Then it displays his/her full name.
-
Next it asks to enter his/her birth date , month & year. Then it displays his/her birthdate in the format dd/mm/yyyy.
-
Next it asks to enter 10- digit phone number. If the phone number does not consist of 10-digits it then asks to re-enter the phone number. If the number is of 10-digits , then it displays valid phone number entered.
-
Next it asks to enter email and confirm it by re-entering it. If the email does not match with the confirmed email, it then asks to re-enter the email. If the email matches the confirmed email, it shows your virtual id in a formatted manner as shown below :-
--------- VIRTUAL ID -------- Full Name : Birthdate : Phone number : Email :