Guest User

qbasic program

a guest
Apr 9th, 2019
118
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. FOR x = 1 TO 4
  2.     READ y$
  3.     PRINT y$
  4.     PRINT
  5.     PRINT "Enter mark of Quiz"
  6.     INPUT q
  7.     PRINT "Enter mark of Assignment"
  8.     INPUT a
  9.     PRINT "Enter mark of Midterm"
  10.     INPUT m
  11.     PRINT "Enter mark of Final"
  12.     INPUT f
  13.     sum = q + a + m + f
  14.     PRINT "your mark of this subject"; sum
  15.     tsum = tsum + sum
  16.     IF sum >= 80 AND sum <= 100 THEN
  17.         PRINT "you have got A+"
  18.     ELSEIF sum >= 75 AND sum <= 79 THEN
  19.         PRINT "you have got A"
  20.     ELSEIF sum >= 70 AND sum <= 74 THEN
  21.         PRINT "you have got A-"
  22.     ELSEIF sum >= 65 AND sum <= 69 THEN
  23.         PRINT "you have got B+"
  24.     ELSEIF sum >= 60 AND sum <= 64 THEN
  25.         PRINT "you have got B"
  26.     ELSEIF sum >= 55 AND sum <= 59 THEN
  27.         PRINT "you have got B-"
  28.     ELSEIF sum >= 50 AND sum <= 54 THEN
  29.         PRINT "you have got C+"
  30.     ELSEIF sum >= 45 AND sum <= 49 THEN
  31.         PRINT "you have got C"
  32.     ELSEIF sum >= 40 AND sum <= 44 THEN
  33.         PRINT "you have got D"
  34.     ELSEIF sum < 40 THEN
  35.         PRINT "you have got F"
  36.     END IF
  37.     PRINT
  38. NEXT x
  39. DATA "FOR ART OF LIVING"
  40. DATA "FOR ENGLISH"
  41. DATA "FOR ISE"
  42. DATA "COMPUTER FUNDAMENTAL"
  43. sum = tsum / 4
  44.  
  45. PRINT "Your average mark"; sum
  46. IF sum >= 80 AND sum <= 100 THEN
  47.     PRINT "your CGPA is: 4.000"
  48. ELSEIF sum >= 75 AND sum <= 79 THEN
  49.     PRINT "your CGPA is: 3.75"
  50. ELSEIF sum >= 70 AND sum <= 74 THEN
  51.     PRINT "your CGPA is: 3.50"
  52. ELSEIF sum >= 65 AND sum <= 69 THEN
  53.     PRINT "your CGPA is: 3.25"
  54. ELSEIF sum >= 60 AND sum <= 64 THEN
  55.     PRINT "your CGPA is: 3.00"
  56. ELSEIF sum >= 55 AND sum <= 59 THEN
  57.     PRINT "your CGPA is: 2.75"
  58. ELSEIF sum >= 50 AND sum <= 54 THEN
  59.     PRINT "your CGPA is: 2.50"
  60. ELSEIF sum >= 45 AND sum <= 49 THEN
  61.     PRINT "your CGPA is: 2.25"
  62. ELSEIF sum >= 40 AND sum <= 44 THEN
  63.     PRINT "your CGPA is: 2.00"
  64. ELSEIF sum < 40 THEN
  65.     PRINT "your CGPA is: 0.00"
  66. END IF
RAW Paste Data