Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
help needed from the friendly beginner
#1
Hello does anyone help me in my project, its very simple, I know how to do it but It showed errors in every line so I'm very pissed off.
The question is:
Write a program to allow the user to input the name of a student and the marks in 5 subjects till the user wants and find the total average marks, division and rank. If the student is failed, "****" should come in rank. (40<failed, 40> and 55< = 3rd division, 55><70,=third division and 70>=First division. Note: It is in percentage if you don't know yet :wink: ) BTW, if any student scores lower than 40 marks out of 100, then failed in all the whole exam, means rank = "****".
Reply
#2
uhhh
Code:
DIM F.NAME$(1 TO 50), L.NAME$(1 TO 50), MARKS(50, 1 TO 100), AVERAGE(1 TO 50)

LINE INPUT "NUMBER OF STUDENTS? "; STUDENTS
LINE INPUT "# OF SUBJECTS? "; SUBJECTS
FOR A = 1 TO SUBJECTS
LINE INPUT "# OF MARKS IN SUBJECT "+SUBJECTS; MARKS(50, SUBJECTS)
NEXT A
FOR A = 1 TO STUDENTS
  PRINT "STUDENT #"; A
  LINE INPUT "LAST NAME: ";L.NAME$(A)
  LINE INPUT "FIRST NAME: ";L.NAME$(A)

FOR B = 1 TO SUBJECTS
   PRINT "":  PRINT "SUBJECT"; B; " SCORES:"
   LINE INPUT "SCORE #"+B+":"; MARKS(A, B)
NEXT B
NEXT A

too lazy to finish. use something like that, and then just make it print out and add up marks(a,b). this is very messy code, but you should get the idea. the dim statements can be modified to allow more students (currently only 50 max) and such.
ammit potato!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)