I think the 22/10/1901 was a Tuesday... :-/
http://www.infoplease.com/calendar.php?month=10&year=1901&submit=Go
Its not like using datestr and solving this. You need to calculate the days and divide it by 7, take the reminder and increment that many days to present day.
Problem statement would be much better with an additional sentence:
"Solve the problem in the hypothetical world where 16 April 2019 happens on Saturday instead of Tuesday."
Otherwise this is just lame.
Really, Bainhome...the problem is not 'some function you did not grasp' but the logic applied in solving this particular mathematical problem. :)
I'll suggest you take a relativistic approach as opposed to @Vivek comment. Goodluck.
To be honest, this one took me a while...and when it finished, my first thought is: code like that should considered as a crime...let me think this through.Thx man!
have to admit, this code and the one alfonso wrote are really elegant. I will look into it tomorrow.
280 Solvers
197 Solvers
280 Solvers
Fix the last element of a cell array
360 Solvers
493 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!