Friday, October 18, 2019

151. Qbasic sequential file handling to tore name and marks of any three subjects also calculate total and percentages only for 15 students.

151.Create a sequential data file’post.dat’ to store name and marks of any three subjects also calculate total and percentages only for 15 students.
OPEN "post.dat" FOR OUTPUT AS #1
FOR I = 1 TO 15
INPUT "Enter Name"; n$
INPUT "Enter marks in any three subjects”; A, B, C
T = A + B + C
P = T / 3
WRITE #1, n$, A, B, C, T, P
NEXT I
CLOSE #1
END

No comments:

Post a Comment