Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

the code is in c++, thanks. - Similarly, you can calculate the second letter but using the days of your age. - You are not

image text in transcribed

image text in transcribed

the code is in c++, thanks.

- Similarly, you can calculate the second letter but using the days of your age. - You are not allowed to use any header files except . Limitations: - Assume all months are 30 days. - Assume your age doesn't exceed 99 yearsi). - Assume that the user will enter the correct information so that the code does not check the correctness of the data. (25 marks) Write a code in C++ to derive the permanent code from your age and date of birth. The Permanent Code System (PCS) should work as follows: Welcome to the Permanent Code System (PCS) Enter your date of birth (YYYY mm dd) : 20000430 Enter the current date (YYYY mm dd) : 20230125 Your age is 22y8m 25d Your Permanent code: VY000430 Welcome to the Permanent Code System (PCS) Enter your date of birth (YYYy mm dd) : 19901203 Enter the current date (YYYy mm dd) : 20230125 Your age is 32y lm 22d Your Permanent code: FV901203 Conditions: - Follow the format shown in all relevant figures. - The permanent code consists of two characters and six numbers, e.g. FV901203. - The first two numbers represent the last two digits of your year of birth (e.g. If you were born in 1990, use 90 in your permanent code.) - The second two numbers represent your month of birth (e.g. if you were born in Dec use 12 in permanent code). - The third two numbers represent your day of birth (For example, if you were born on the 3rd of the month, use 03 in the permanent code). - After calculating the age, convert the number of years to a capital letter. Assuming that 1 is ' A ', 2 is ' B ', and 26 is 'Z'. In case your age is above 26 warp around starting from 1 (e.g. your age is 32 becomes 6 and it is ' F '. This character is the first letter in the permanent code

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Solaris 11.2 System Administration (oracle Press)

Authors: Harry Foxwell

1st Edition

007184421X, 9780071844215

More Books

Students also viewed these Databases questions

Question

5. Do you have any foreign language proficiency?

Answered: 1 week ago