As in the previous tasks, we can divide the solution into three smaller tasks:
- Reading the input from the console.
- Doing the calculations.
- Printing the output on the console.
The first thing we have to do, is go through the input of the task. It is important to pay attention the the sequence they are given in. With
Console.ReadLine(…) we read values from the console and with
double.Parse(…), we convert the particular string value into