Advertisement
Alish_001

practical test

Dec 7th, 2021
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. REM PROGRAM TO DISPLAY SUM OF TWO NUMBERS
  2. CLS
  3. INPUT “ENTER FIRST NUMBER”; A
  4. INPUT “ENTER SECOND NUMBER”; B
  5. S = A + B
  6. PRINT “SUM OF TWO NUMBERS”; S
  7. END
  8.  
  9.  
  10. REM PROGRAM TO DISPLAY PERIMETER OF RECTANGLE
  11. CLS
  12. INPUT “ENTER LENGTH”; L
  13. INPUT “ENTER BREADTH”; B
  14. P = 2 * (L + B)
  15. PRINT “PERIMETER OF RECTANGLE ”; P
  16. END
  17.  
  18.  
  19. **********************************************************************************************
  20.  
  21. REM PROGRAM TO DISPLAY PERIMETER OF SQUARE
  22. CLS
  23. INPUT “ENTER LENGTH”; L
  24. P = 4 * L
  25. PRINT “PERIMETER OF SQUARE ”; P
  26. END
  27.  
  28.  
  29.  
  30. *******************************************************************************************
  31. area
  32. ******************************************************************************************
  33. REM PROGRAM TO DISPLAY AREA OF RECTANGLE
  34. CLS
  35. INPUT “ENTER LENGTH”; L
  36. INPUT “ENTER BREADTH”; B
  37. A = L * B
  38. PRINT “AREA OF RECTANGLE ”; A
  39. END
  40.  
  41.  
  42.  
  43.  
  44. REM PROGRAM TO DISPLAY AREA OF SQUARE
  45. CLS
  46. INPUT “ENTER LENGTH”; L
  47. A = L ^ 2
  48. PRINT “AREA OF SQUARE ”; A
  49. END
  50.  
  51.  
  52. circle*************************
  53. CLS
  54. LET pie = 3.14
  55. INPUT "Enter radius of circle"; r
  56. a = pie * r ^ 2
  57. c = 2 * pie * r
  58. PRINT "The area of the circle is"; a
  59. PRINT "The circumference of the circle is"; c
  60. END
  61.  
  62.  
  63. ******************************************************************************
  64. CLS
  65. INPUT "Enter a Number: ", n
  66. IF n MOD 2 = 0 THEN
  67. PRINT "Input Number is Even"
  68. ELSE
  69. PRINT "Input Number is Odd"
  70. END IF
  71. END
  72.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement