We will read the input data and depending on the distance, we will choose the cheapest transport. To do that, we will write a few conditional statements.
In the task, we are given information about the input and output data. Therefore, in the first two lines from the solution, we will declare and initialize the two variables that are going to store the values of the input data.
The first line contains an integer and that is why the declared variable will be of type
int. The second line contains a word, therefore, the variable will be of type
Before starting with the conditional statements, it is necessary that we declare a variable that stores the value of the price of the transport.