KnowledgeBoat Logo

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.

QBASIC: Conditional Statements

24 Likes

Answer

Flowchart

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. Class 7 ICSE Understanding Computer Studies

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

Answered By

13 Likes


Related Questions