I'm looking for solve for this task in c#.
There is an X and Y coordinate system. The task is to find the equation that matches the red line at the same angle and print the value of this line through the specified number of steps on the X scale.
Image below is an example of what I need to get. Given these points
- P1 (1/10)
- P2 (10/50)
For example:
- What will be Y value when the X value will go to 20?
- How can I code it?
Also if you can, explain please the code. The problem is that line in task could be at random angle in each task.