if ($#argv == 3) then switch ($argv[2]) case +: @ e = $argv[1] + $argv[3] breaksw case -: @ e = $1 - $3 breksw case x: @ e = $1 * $3 breaksw case /: @ e = $1 / $3 breaksw case %: @ e = $1 % $3 breaksw case :: @ a = $1 / $3 @ b = $1 % $3 @ c = $b * 1000 @ d = $c / $3 if ($d < 0) @ d = $d * -1 set e = ${a},${d} breaksw endsw echo $e endif
- Monday
- November 25th, 2024
- Ajouter un cours