<?php function test($input) { var_dump(($input >= 0.6 && $input <= 1) ? range ('A', 'D')[(0.999 - $input)*10] : 'F'); } test(0.7); test(1); test(0.6); test(0.5); test(2);
You have javascript disabled. You will not be able to edit any code.