Computer Science, asked by debaratidas12, 11 months ago

write a gw basic program to print the table of 9.(Use For-Next).​

Answers

Answered by nandangalih
0

Answer:

Program:

10       CLS

20      FOR B = 2 TO 40 STEP 2

     30      PRINT B

     40      NEXT  B

     50      END

Algorithm

Step 1  START

Step 2  STORAGE    B=2

Step 3  DECISION    IS B<= 40 IF

NOT THEN GO TO STEP 7

Step 4  COMPUTE    B=B+2

Step 5   PRINT

STEP 6  GOTO STEP 3

Step 7 END

Algorithm

Step 1  START

Step 2  INPUT      L , W

Step 3  COMPUTE   AREA= L * W

Step 4    PRINT   AREA

Step 5  END

Practical: 11: Write a program that can calculate the perimeter of the rectangular.

Program:

10    CLS

20     INPUT “Length …=”;L

30     INPUT  “Width …=”; W

40     PERIMETER=  2* ( L+W)

50     PRINT “ PERIMETER….. =”; PERIMETER

60     END

Algorithm

Step 1  START

Step 2  INPUT      L , W

Step 3  COMPUTE   PERIMETER = 2* ( L+W)

Step 4    PRINT   PERIMETER

Step 5  END

Practical: 12: Write a program that can calculate the square and cube of any number.

Program:

10    CLS

20     INPUT “ Enter any No..…=”; N

30     Sq = N*N

40     Cub= N^3

50     PRINT “ Square….. =”; Sq

60     PRINT “ Cube….. =”; Cub

70      END

Algorithm

Step 1  START

Step 2  INPUT      N

Step 3  COMPUTE   Sq = N*N

Step 4 COMPUTE   Cub = N^3

Step5  PRINT   Sq ,Cub

Ste  

Practical: 13: Write a program that can convert temperature from Centigrade to Fahrenheit

Program:

10    CLS

20     INPUT “ Temperature in Centigrade :=”; C

30     F = 9/5* C+32

40     PRINT “Temperature in Fahrenheit =”; F

50     END

Algorithm

Step 1  START

Step 2  INPUT      C

Step 3  COMPUTE    F = 9/5* C+32

Step 4  PRINT        F

Step 5  END

Practical: 14: Write a program that can convert temperature from Fahrenheit to Centigrade

Program:

10    CLS

20     INPUT “ Temperature in  Fahrenheit  :=”; F

30     C = 5/9* ( F-32)  

40     PRINT “Temperature in Centigrade  =”; C

50     END

Algorithm

Step 1  START

Step 2  INPUT      F

Step 3  COMPUTE    C = 5/9* ( F-32)

Step 4  PRINT        C

Step 5  END

Practical: 15:  Write a program that can draw a Triangle.

Program:

10    CLS

20     SCREEN 2

30     LINE  (110,50)- (160,100)  

40     LINE  (60,100)- (160,100)

50     LINE  (110,50)- (60,100)  

60     END

Algorithm

Step 1      START

Step 2       PRINT SCREEN 2

Step 3       OUTPUT       LINE (110, 50) - (160,100)  

                                LINE (60,100) - (160,100)

                                LINE (110, 50) - (60,100)  

Step 4            END

Practical: 16:  Write a program that can draw a Rectangle.

Program:

10    CLS

20     SCREEN 2

30     LINE  (70,80)- (190,170),,B  

40        END

Algorithm

Step 1      START

Step 2       PRINT SCREEN 2

Step 3       OUTPUT       LINE (70, 80) - (190,170),, B  

Step 4       END

Practical: 17: Write a program that can add 15+ 30+20+325

Explanation:

Similar questions