Microsoft Small Basic

Program Listing: QJS160

TextWindow.WriteLine("enter the x coordenate of a point up to 21")
ax=TextWindow.ReadNumber()

TextWindow.WriteLine("enter the y coordenate of that point plz dont repeat")
ay=TextWindow.ReadNumber()

TextWindow.WriteLine("enter the x coordenate of second poinr plz dont repeat")
bx=TextWindow.ReadNumber()

TextWindow.WriteLine("enter the y coordenate of second point plz dont repeat")
by=TextWindow.ReadNumber()

skip:

sizex=Math.Abs( bx-ax)
sizey=Math.Abs( by-ay)

apax= Math.Power(2,ax)

apay= Math.Power(2,ay)
apbx= Math.Power(2,bx)
apby= Math.Power(2,by)


a=apbx-apax

b=apbx-apay
unit=a*b
If bx-ax<0 Then
sign=-1
Else
sign=1
EndIf

If by-ay<0 Then
signy=-1
Else
signy=1
EndIf
TextWindow.WriteLine("the five dimentionals space is defined as")
TextWindow.WriteLine("sizex"+sizex)


TextWindow.WriteLine("sizey"+sizey)







TextWindow.WriteLine("totalsize"+unit)

TextWindow.WriteLine("signx"+sign+"signy"+signy)





TextWindow.WriteLine("going back from 5d to 4d please wait a moment")



re:




dig=21
ax= Math.GetRandomNumber(dig)
bx= Math.GetRandomNumber(dig)
ay= Math.GetRandomNumber(dig)
by= Math.GetRandomNumber(dig)

sizex2=Math.Abs( bx-ax)
sizey2=Math.Abs( by-ay)

apax= Math.Power(2,ax)

apay= Math.Power(2,ay)
apbx= Math.Power(2,bx)
apby= Math.Power(2,by)


a=apbx-apax

b=apbx-apay
hipaso=a*b
If bx-ax<0 Then
sign2=-1
Else
sign2=1
EndIf

If by-ay<0 Then
signy2=-1
Else
signy2=1
EndIf
If hipaso=unit and sizex2=sizex And sizey2=sizey and sign=sign2 And signy2=signy Then


Goto fin
EndIf






Goto re
fin:
TextWindow.WriteLine("fin")

TextWindow.WriteLine(" ax= "+ax+" ay= "+ay+" bx= "+bx+" by="+by)