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
25 Likes
Answer
Flowchart
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
17 Likes
Related Questions
Draw a flowchart and write a program in QBASIC to calculate the area and the perimeter of 10 different rectangles. Take the length and breadth as inputs and display the result.
A class teacher wants to calculate the average marks obtained by a student in three terms in a class of 50 students. Draw a flowchart and write a program in QBASIC to enter the name and the total marks obtained by a student in three terms. Display the result along with the name.
Draw a flowchart and write a program in QBASIC to display the sum of the first 10 terms of the series S = 99 + 90 + 81 + …….
Draw a flowchart and write a program in QBASIC to display the sum of the first 10 terms of the series S = 1 + 2 + 4 + 8 + …….