i've tried to do so but i ended up with this:
and here is my code:
Code: Select all
CLS
INPUT "Enter pyramid lines:", x
NEW:
FOR spaces = 1 to x
PRINT " ";
NEXT spaces
PRINT "*"
x = x - 1
IF X <> 0 THEN GOTO NEW
END
Moderators:Administrator, Global Moderator
Code: Select all
CLS
INPUT "Enter pyramid lines:", x
NEW:
FOR spaces = 1 to x
PRINT " ";
NEXT spaces
PRINT "*"
x = x - 1
IF X <> 0 THEN GOTO NEW
END
Code: Select all
CLS
INPUT "Enter pyramid lines: ", x
PRINT SPACE$(x - 1);
PRINT "*"
FOR i = 2 TO x
PRINT SPACE$(x - i);
PRINT "*";
PRINT SPACE$((i - 1) * 2 - 1);
PRINT "*"
NEXT i
END
Code: Select all
CLS
INPUT "Enter pyramid lines: ", X
FOR I = X TO 1 STEP -1
PRINT SPC(I - 1); "*";
LOCATE , X * 2 - I
PRINT "*"
NEXT