PLS CORRECT MY CODE - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

PLS CORRECT MY CODE

meandmemeandme Posts: 4Member
hi can you pls correct the following 3 simple codes. I have to teach my brother but these 3 pros are not compiling. I will greatly appreciate your help. regards, sohail.

REM DRAW A TRIANGLE
10 CLS
20 SCREEN 2
30 LINE (100, 40)-(150, 90)
40 LINE (50, 90)-(150, 90)
50 LINE (100, 40)-(150, 90)


REM WRITE A PROGRAME GENERLIZE THE FOLLOWING NUMBERS 7,17,27,37 INTO ASSENDING AND DECENDING ORDER
10 CLS
20 PRINT "ASSENDING ORDER ="
30 FOR A = 7 TO 37 STEP 10
40 PRINT A
50 NEXT A
60 PRINT "DECENDING ORDER ="
70 FOR B = 37 TO 7 STEP 10
80 PRINT B
90 NEXT B
100 END

REM WRITE A PROGRAM TO FIND THE GREATER NUMBER OF ANY THREE GIVEN NUMBERS
10 CLS
20 DIM X(5)
30 FOR A = 1 TO 3
40 INPUT "ENTER NUMBER "; X(A)
50 NEXT A
60 LET LAR = X(1)
70 FOR B = 2 TO 3
80 IF X(B) > LAR THEN LAR = X(B)
90 NEXT
100 PRINT "THE LARGEST NUMBER"; LAR
110 END


Comments

  • IDKIDK Posts: 1,784Member
    : hi can you pls correct the following 3 simple codes. I have to teach my brother but these 3 pros are not compiling. I will greatly appreciate your help. regards, sohail.

    [code]:
    : REM DRAW A TRIANGLE
    : 10 CLS
    : 20 SCREEN 2
    : 30 LINE (100, 40)-(150, 90)
    : 40 LINE (50, 90)-(150, 90)
    : 50 LINE (100, 40)-(150, 90)
    :
    :
    : REM WRITE A PROGRAME GENERLIZE THE FOLLOWING NUMBERS 7,17,27,37 INTO ASSENDING AND DECENDING ORDER
    : 10 CLS
    : 20 PRINT "ASSENDING ORDER ="
    : 30 FOR A = 7 TO 37 STEP 10
    : 40 PRINT A
    : 50 NEXT A
    : 60 PRINT "DECENDING ORDER ="
    : 70 FOR B = 37 TO 7 STEP [red]-[/red]10
    : 80 PRINT B
    : 90 NEXT B
    : 100 END
    :
    : REM WRITE A PROGRAM TO FIND THE GREATER NUMBER OF ANY THREE GIVEN NUMBERS
    : 10 CLS
    : 20 DIM X(5)
    : 30 FOR A = 1 TO 3
    : 40 INPUT "ENTER NUMBER "; X(A)
    : 50 NEXT A
    : 60 LET LAR = X(1)
    : 70 FOR B = 2 TO 3
    : 80 IF X(B) > LAR THEN LAR = X(B)
    : 90 NEXT
    : 100 PRINT "THE LARGEST NUMBER"; LAR
    : 110 END
    : [/code]
    :

    The only error I saw is marked in red
Sign In or Register to comment.