Consult the site http://en.wikipedia.org/wiki/Ieee from where it can be seen that IEEE Members who have reached the age of 65 and whose number of years of membership plus their age in years adds up to at least 100 are recognized as Life Members. Let us write a function which takes the year of birth & year of taking IEEE membership of a person and results in the year when the person can be eligible for being the life member of IEEE. For example, if a person was born in 1940 & took IEEE membership in 1965 then he/she can be eligible in 2005 because at 2005, his age becomes 65 & his number of years of membership(40) plus his age in years(65) adds up to 105(>100). So, the function ieee_lm(1940,1965)=2005
Solution Stats
Problem Comments
8 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers74
Suggested Problems
-
6435 Solvers
-
299 Solvers
-
All your base are belong to us
574 Solvers
-
Back to basics 8 - Matrix Diagonals
962 Solvers
-
1063 Solvers
More from this Author1
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
Aritra, please fix the test suite. There is a typo in assert function.
Also, the correct answer for first test (and the example) is 2003, not 2005!
Khaled, I believe the answer to the first one is still 2005, as the person has to be 65 years old. Once a member hits 65 years old, their age plus years as a member must be >100. At least, that's how I read the problem description.
Yes. The test suite needs to be fixed.
@james, You are correct. I missed the first condition.
@Aritra : Fix the test suite. you have typed y as 'yy' in your test suite.correct it
I fixed the obvious typo with the "yy".
Thanx @Ned for fixing d typo. thnx everyone for their concern