Problem 2196. Tax Season ! How much is my salary?
Tax Season! I was employed for a period from x until y in a year and I get pay check of amount z on every alternate Friday of the week starting from first Friday since I am employed. Help me find out how much did I earn during my employment period.
Example
x = 01-Jan-2014 y = 14-Feb-2014 z = $2000 (x will always be <y)
This period has total 4 alternate Fridays which were my "pay-days", so the salary for this period was 4*2000 = %8000
Solution Stats
Problem Comments
-
1 Comment
Jean-Marie Sainthillier
on 7 Mar 2014
I like your "calendar" problems serie. They are efficient to understand how Matlab represent dates and times.
Solution Comments
Show commentsGroup

Number Manipulation IV
- 15 Problems
- 30 Finishers
- Pattern Sum
- Smallest n, for n! to have m trailing zero digits
- Still more miles to go before I sleep
- Convert from Base 10 to base 5
- Numbers on 7-segment
- Expand 10^n to Powers of 4
- Muphry's Law of MATLAB
- Lunar Arithmetic (Addition)
- Lunar Arithmetic (Multiplication)
- Permutation Via Multiplication
- The last non-zero digit of a factorial
- The number of trailing zero digit of a factorial
- Whole Number Concatenator
- Whole Number Un-Concatenator
- Smallest n, for n! to have m trailing zero digits
- Better Index Number
Problem Recent Solvers63
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!