fork download
  1. # result input number
  2. puts("Enter Your Result")
  3. score=gets
  4. result = case score.to_f
  5. when 0..40 then "Fail"
  6. when 41..60 then "Pass"
  7. when 61..70 then "Pass with Merit"
  8. when 71..100 then "Pass with Distinction"
  9. else "Invalid Score"
  10. end
  11.  
  12. puts result
Success #stdin #stdout 0.02s 7456KB
stdin
45
stdout
Enter Your Result
Fail