I've never ever used loops before and I've been asked to create a programme where the user the user types in the time they want to take on their journey and then there is a list of three journeys in a text file. My application is going to calculate the time they want to take on their journey and then compare it to the three options, if the journey can be completed in one of the journeys then the result should be written on the screen and and to an output file called results.txt. If the journey can't be completed then it should only be written to the screen. The messages to the screen should only indicate if the journey is suitable of not.
This is the journey data:
1 -Amount of changes
200 - Distance 90 -Time
This is the format it is wanted in:
<c> // where c is the number of changes
<dn><sn> // for each leg n, dn is the distance and sn is the speed. Note n=(c+1).
This is what is needed in the programme:
• Writing To Files.
• Iterative Statements (while / for).
• Nested Loops.
• Conversion between decimal and 24 hour clock representations of time.
So far I have only made the programme so the user can enter the time in minutes and in hours and it will be converted in to minutes.