KnowledgeBoat Logo

Computer Studies

Draw a flowchart and write a program in QBASIC to enter the name and marks secured in 12 subjects in a term examination. Display the name, total and the average marks.

QBASIC: For-Next Statements

26 Likes

Answer

Flowchart

Draw a flowchart and write a program in QBASIC to enter the name and marks secured in 12 subjects in a term examination. Display the name, total and the average marks. Class 7 ICSE Understanding Computer Studies

QBASIC Program

Cls
Let T = 0
Let AVG = 0
Input "Enter name"; N$
For I = 1 To 12
    Input "Enter marks"; M
    T = T + M
Next I
AVG = T / 12
Print "Name - "; N$
Print "Total marks -"; T
Print "Average marks - "; AVG
End

Output

Enter name? Richa
Enter marks? 89
Enter marks? 89
Enter marks? 87
Enter marks? 90
Enter marks? 99
Enter marks? 95
Enter marks? 97
Enter marks? 92
Enter marks? 78
Enter marks? 95
Enter marks? 78
Enter marks? 80
Name - Richa
Total marks - 1069
Average marks - 89.08334

Answered By

18 Likes


Related Questions