Howdy, Stranger!

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

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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.