uni-assignments

My university programming assignments
git clone git://git.christosmarg.xyz/uni-assignments.git
Log | Files | Refs | README

avgsort.awk (202B)


      1 #!/usr/bin/env -S awk -f
      2 
      3 {
      4         sum = cnt = 0;
      5         for (i = 4; i <= NF; i++) {
      6                 sum += $i;
      7                 cnt++;
      8         }
      9         print "Student", NR",", $1, $2",", sum / cnt
     10 }