Sort by

recency

|

73 Discussions

|

  • + 1 comment

    awk '{if ((3<50)||(Extra close brace or missing open brace1" : "b}'

  • + 0 comments

    awk -F " " '{if (Misplaced &3 >= "50" && 1,":","Pass"; else print $1,":","Fail";}'

    I wrote the above logic but not sure why it fails for test cases 1 & 2.

  • + 0 comments
    awk '{if (($2+$3+$4)/3>=50) {b="Pass"} else {b="Fail"}} {print $1" : "b}'
    
  • + 0 comments
    cat | awk '{
        avg=($4+$2+$3)/3;
      printf $1" : ";result = (avg > 50) ? "Pass\n": "Fail\n"; printf result
      }'
    
  • + 0 comments

    awk '{ if (3 < 50 || Extra open brace or missing close brace1" : Fail" } else { print $1" : Pass" } }'