Computer Studies
Draw a flowchart and write a program in QBASIC to enter your name and the marks obtained in 10 different subjects in a term examination. Display the sum and average on the screen along with the name.
Answer
Flowchart
QBASIC Program
Cls
Input "ENTER NAME"; N$
Let C = 1
Let S = 0
START:
Input "ENTER MARKS"; M
S = S + M
C = C + 1
If C <= 10 Then GoTo START:
Print "NAME - "; N$
Print "TOTAL = "; S
Let AVG = S / 10
Print "AVERAGE = "; AVG
End
Output
ENTER NAME? RICHA
ENTER MARKS? 87
ENTER MARKS? 89
ENTER MARKS? 89
ENTER MARKS? 90
ENTER MARKS? 99
ENTER MARKS? 95
ENTER MARKS? 98
ENTER MARKS? 89
ENTER MARKS? 85
ENTER MARKS? 89
NAME - RICHA
TOTAL = 910
AVERAGE = 91
Related Questions
Draw a flowchart and write a program in QBASIC to enter the numerator and denominator of a fraction. Check and print whether the fraction is proper or improper. The program will also display the difference between the numerator and the denominator accordingly.
Draw a flowchart and write a program in QBASIC to accept three angles of a triangle. The program will check whether the triangle is possible or not.
Draw a flowchart and write a program in QBASIC to display the first 10 terms of the series:
11, 17, 23, ………Draw a flowchart and write a program in QBASIC to display the first 10 terms of the series:
144, 121, 100, ………