Please help me with the task: Draw a way to a safe place.

Hello, I’m working on this task:

Write a program that calculates and outputs to the screen the distance from your position (blue dot) to the destination (red dot). Tip: You need to use int variables and plus ‘+’ operation in your solution.

Here is my code:


public static class DrawToSafetyPlace
{
   public static void Main()
   {
       int L;
       L = 175
       int W;
       W= 75
       int result = L + 4W;
       Console.WriteLine(result);
   }
   }

Can anyone please help me to solve it?

Hi @BreadBoy , welcome to CodeEasy!

seems like you are missing a semicolon after
W= 75
and you need to use the asterisk to indicate the multiplication:
L + 4 * W
Hope this helps!