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:
using System;
public static class DrawToSafetyPlace
{
public static void Main()
{
int height;
height = 175;
int width;
width = 75;
int result = width + width + width + width + height;
Console.WriteLine(result);
}
}
Hello! There is an error in your code. The width is 3 times 75, not 4…