In one pass, Train A can start from source station at
time TIO].halt at each station for h unit of time until
it reaches last station at time T(n-1),where n is the
positive Integer representing total number of
stations.
Given, Train A's timings
T[0] = 10.00 T[1] = 10.04 T [2] = 10.09
T
[3] = 10.15 T[4] = 10.19 T[5] = 10.22
Now, suppose Railway Admin want to add more
trains to increase the frequency. So, to launch other
Train B, for the same stations as of Train A's.
Provided the train B starts at time t, they would like
to know the timings for train B.
The program should return a String array S
(timestamps(in float) for train B at each station from
first to last station like train A).
Note that time is represented in 24 Hour Fashion.
startHour should be in range 0...
23.
startMinute should be in range 0.... 59.
Enter start time(24 Hrs)
Example 1:
11.00
11.00 11.04 11.09 11.15 11.19 11.22
Example 2:
-26.15
Answers
Answer:
kavshdjdhbdndlslsbdvvdvsbsbbsbsbbs
Explanation:
plz follow me
Answer:
The train B will have the same timings as train A, but starting at the time provided.
Explanation:
From the above question,
They have given :
The train B will have the same timings as train A, but starting at the time provided.
For example,
if the start time for train B is 11:00, it will arrive at each station at the following times:
11.00 11.04 11.09 11.15 11.19 11.22
The timings for train B will be the same as train A, but starting at the provided start time.
If the start time entered is not within the range of 0 to 23 for the hours and 0 to 59 for the minutes, it will be invalid and the program should return an error message.
In case of example 2, as the given start time is -26.15 which is not valid. So, the program should return an error message that start time is not valid and ask to enter the valid time.
For more such related questions : https://brainly.in/question/26001394
#SPJ3