How do make 10student name and his remarks in q-basic?

1 answer

Answer

1056780

2026-04-14 10:10

+ Follow

'

'*** 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..."

PRINT

'*** 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"

PRINT

'*** 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

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.