fork download
  1. #!/bin/bash
  2.  
  3. while [ 1 ]
  4. do
  5. read a b
  6. a1=0
  7. c=1
  8. c1=1
  9. if [ $a == 1 && $b == 1 ]
  10. break;
  11. while [ "$a1" -le $b ]
  12. do
  13. c1=`echo "($c1 * $a)" |bc`
  14. a1=`echo "$a1+1"|bc`
  15. done
  16. echo "$c1/$a" |bc|sed -e ':a;N;$!ba;s/\n//g'|sed -e 's/\\//g'
  17. done
  18.  
  19.  
Runtime error #stdin #stdout 0.03s 5312KB
stdin
1 20
0 0
stdout
Standard output is empty