In my case I have X different job with Y different duration
so job X=1 will last Y=2.
I need to write a code that give me the following result:
tin1= 0 , tfin1=2, tin2= 2 , tfin2=2+3=5, tin3= 5 , tfin3=5+4=9, tin4=9 , tfin4=9+4=13........ So "tinx" means the inital time of job x, while "tfinx" means the final time of job x. if job one finish at 2, the job two will finish at 2 plus the duration of the job 2 (3) obtaining 5, and so on.
I want to write a code that is able to generate all this value
Does someone help me? the length of D should be variable so I would like to obtain a code that is independent from its length