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
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 ICLOSE #1
END
No comments:
Post a Comment