echo prime or notread nc=0for(( i=1;i<=$n;i++ ))dop=`echo "$n%i" |bc`if [ $p -eq 0 ]thenc=`echo "$c+1" |bc`fi doneif [ $c -eq 2 ]thenecho primeelseecho notfi
Standard input is empty
prime or not not
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!