Computer Science, asked by santspgsk, 1 year ago

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.

Answers

Answered by dreamrob
3

Program:

Dim student As String

Dim maths As Integer

Dim english As Integer

Dim science As Integer

Dim average As Double

Cls

Input "Enter Student Name : ", student

Print "Enter marks out of 100"

Input "Enter marks in Maths : ", maths

Input "Enter marks in English : ", english

Input "Enter marks in Science : ", science

average = (maths + english + science) / 3

Print "Name : "; student

Print "Maths : "; maths

Print "English : "; english

Print "Science : "; science

Print "Average : "; average

End

Output:

Enter Student Name : Riya Singh

Enter marks out of 100

Enter marks in Maths : 89

Enter marks in English : 80

Enter marks in Science : 78

Name : Riya Singh

Maths : 89

English : 80

Science : 78

Average : 82.33333

Attachments:
Similar questions
Math, 6 months ago