I am working on a project for my seventh grade math class and I was wondering how would I calculate the Y-Intercept of a graph with two points knowing the position of the two points. Here is what I have:
Option Explicit
Dim X1, X2, Y1, Y2, Y, X, S
X1=InputBox("Enter X1")
Y1=InputBox("Enter Y1")
X2=InputBox("Enter X2")
Y2=InputBox("Enter Y2")
X=X2-X1
Y=Y2-Y1
S=Y/X
MsgBox("The slope of [" & X1 & "," & Y1 & "] and [" & X2 & "," & Y2 & "] is " & S)
MsgBox("Equation: (" & Y2 & "-" & Y1 & ") / (" & X2 & "-" & X1 & ") = " & S)
I don't know how to compute (X1, Y1) and (X2, Y2) into the Y-Intercept.