Computer Science, asked by santspgsk, 1 year ago

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 average marks.

Answers

Answered by omegads03
42

CLS

INPUT "ENTER NAME: " ; NAME$

INPUT "ENTER MARK OF 1ST SUBJECT: " ; MARK1

INPUT "ENTER MARK OF 2ND SUBJECT: " ; MARK2

INPUT "ENTER MARK OF 3RD SUBJECT: " ; MARK3

INPUT "ENTER MARK OF 4TH SUBJECT: " ; MARK4

INPUT "ENTER MARK OF 5TH SUBJECT: " ; MARK5

INPUT "ENTER MARK OF 6TH SUBJECT: " ; MARK6

INPUT "ENTER MARK OF 7TH SUBJECT: " ; MARK7

INPUT "ENTER MARK OF 8TH SUBJECT: " ; MARK8

INPUT "ENTER MARK OF 9TH SUBJECT: " ; MARK9

INPUT "ENTER MARK OF 10TH SUBJECT: " ; MARK10

INPUT "ENTER MARK OF 11TH SUBJECT: " ; MARK11

INPUT "ENTER MARK OF 12TH SUBJECT: " ; MARK12

TOTAL = MARK1 + MARK2 + MARK3 + MARK4 + MARK5 + MARK6 + MARK7 + MARK8 + MARK9 + MARK10 + MARK11 + MARK12

AVERAGE = TOTAL / 12

PRINT "NAME : " ; NAME$

PRINT "TOTAL MARKS : " ; TOTAL

PRINT "AVERAGE MARK : " ; AVERAGE

END

Attachments:
Answered by rampraweshkumar79031
5

Explanation:

Flowchart and algorithm

Write an algorithm for finding the average of two numbers and also draw a flowchart.

Algorithm: Input: two numbers x and y Output: the average of x and y Step 1 : input x,y Step 2: sum=0,average=0 Step 3:sum = x + y Step 4:average = sum /2 Step 5: print average.

Similar questions