title: How to print script so the calculated weighted grade for each student that appears in the data file
body: <p>How do I print my script so the calculated weighted grade for each student that appears in the data     file?
  Down below I have formatted my script except the printing aspect.</p>
  
  <pre><code>BEGIN {
      FS=","
  }
  
  $4~/[0-9]/ {
  
      EARN[STUDENT$2]+=$4
      POSSIBLE[STUDENT$2]+=$5
      STUDENTS[STUDENT]++
      CATEGORIES[$2]++
  }
  END {
   #      for (ASSIGNMENT in EARN) {
    #             print ASSIGNMENT,EARN[ASSIGNMENT]/POSSIBLE[ASSIGNMENT]
    #     }
      for (STUDENT in STUDENTS) {
             Homework=(EARN[STUDENT"Homework"]/POSSIBLE[STUDENT"Homework"])*0.10
             Lab=(EARN[STUDENT"Lab"])*0.30
             Quiz=(EARN[STUDENT"Quiz"]/POSSIBLE[STUDENT"Quiz"])*0.20
             Total=HOMEWORK+LAB+QUIZ
              LETTER="A"
              }
              if (TOTAL &lt;= 90) {
                      LETTER="B"
              }
              if (LETTER &lt;= 80) {
                      LETTER="C"
              }
              if (LETTER &lt;= 70) {
                      LETTER="D"
              }
              if (LETTER &lt;= 60){
                      LETTER="E"
              }
  
  }
  </code></pre>