You are on page 1of 3

Start

Declare variables x1, x2, x3, y1, y2, y3, p

Display "Please Enter 3 coordinates

Input x1, y1

Display x1, y1

Input x2, y2

Display x2, y2

Input x3, y3

Display x3, y3

Display "Please input force"


Input p

Declare variable x12, x23, y12, y23

Calculate
x12=x2-x1
x23=x3-x2
y12=y2-y1
y23=y3-y2

Declare variable l12,l23

Calculate
l12=sqrt((x12*x12)+
(y12*y12))
l23=sqrt((x23*x23)+

Declare variable a12, b12, a23, b23

Calculate
a12=x12/l12
b12=y12/l12
a23=x23/l23
b23=y23/l23

Declare variable n12, n23


Calculate
n12=(-(p*a23))/((-(b12*a23))+(-(a12*b23)))
n23=(-(p*a12))/((-(b23*a12))+(-(a23*b12)))

Display "The answer is N12="<<n12<<" and


"<<"N23="<<n23

End

You might also like