'
'*** PROGRAM: Collecting student data: names/marks.
'
'*** Create 2 array variables to store each students name/marks...
DIM students$(10), marks$(10)
'*** SCREEN ONE/Collect the data...
CLS '...(CL)ear the Output (S)creen
'*** print heading...
PRINT "PROGRAM: Collecting each student names/marks..."
'*** A FOR/NEXT loop is used to collect each individual students data...
FOR eachStudentNo% = 1 TO 10
'*** Get each students names/marks
'by typing these values in from the keyboard....
PRINT eachStudentNo%; ">"
INPUT " Enter student name"; students$(eachStudentNo%)
INPUT "Enter student marks"; marks$(eachStudentNo%)
NEXT
'*** SCREEN TWO: Output the collected data...
CLS '...(CL)ear the Output (S)creen
'*** Print headings...
PRINT "Student No.", "Student Name", "Student Marks"
'*** FOR/NEXT loop is used to print out the 2 array student 'name/marks' values...
FOR eachStudentNo% = 1 TO 10
'*** print out each students 'number/name/mark' values...
PRINT eachStudentNo%,
PRINT students$(eachStudentNo%),
PRINT marks$(eachStudentNo%)
NEXT
END '...END of program/halt program code execution
Copyright © 2026 eLLeNow.com All Rights Reserved.