Hi, I'm having a little trouble with my IF statement at the end here.
dim array(4,4)
`create squares
For x=1 to 4
For y=1 to 4
input "please type the dimensions of your square ", mytimes
array(x,y) = mytimes
Next y
cls
print "now for square number ", x+1
Next x
cls
wait 100
cls
input "Thank you. Which square would you like to see 1 , 2, 3 or 4? " , square#
rem draw boxes
if square# = 1
box array(1,1),array(1,2),array(1,3),array(1,4)
wait key
else
if square# = 2
box array(2,1),array(2,2),array(2,3),array(2,4)
wait key
else
if square# = 3
box array(3,1),array(3,2),array(3,3),array(3,4)
wait key
else
if square# = 4
box array(4,1),array(4,2),array(4,3),array(4,4)
wait key
else
print "sorry, please choose a number from 1 to 4"
endif
endif
endif
endif
`box 10,40,30,60
`box 100,150,150,200
`box 50,80,90,120
`box 200,300,230,330
input "would you like to choose another square to see? y/n ", yes$
if yes$ = "y"
else
if yes$ = "n"
print "ok, press any key to exit"
else
input "please choose y or n", yes$
endif
endif
wait key
This is probably a really long way of creating this program but whilst I was writing it I realised I didn't know which loop to use to get back from the y$ command at the end to the choice of squares to see.
I would have used GOTO line number but it didn't work.
Thanks