i=2 rem=1 echo "Enter a number" read num if [ $num -lt 2 ] then echo "$num is not prime" exit 0 fi while [ $i -le `expr $num / 2` -a $rem -ne 0 ] do rem=`expr $num % $i` i=`expr $i + 1` done if [ $rem -ne 0 ] then echo "$num is prime" else echo "$num is not prime" fi
The following PHP Code will display the prime numbers between 2 and 50.You know that 1 is not a prime number so edit the value for "first for loop" according to your requirements (you can also do it for 2 to 1000 or from 900 to 929)Output will be:2is a prime number3is a prime number5is a prime number7is a prime number11is a prime number13is a prime number17is a prime number19is a prime number23is a prime number29is a prime number31is a prime number37is a prime number41is a prime number43is a prime number47is a prime number2013-02-22: Replaced $i/2 with sqrt($i) for efficiency by Ryankirgan
echo enter a range read rng echo 2 j=3 while test $j -le $rng do i=2 x=`expr $j - 1` while test $i -le $x do if [ `expr $j % $i` -ne 0 ] then i=`expr $i + 1` else break fi done if [ $i -eq $j ] then echo $j fi j=`expr $j + 1` done
Echo Point ended on 1995-12-01.
No need to fast for 2D echo, I just did mine.
The plural form of echo is echoes.The plural of echo is echoes.
It is found after you defeat Dark Samus in the Sanctuary Fortress.
The plural noun of "echo" is "echoes."
Echo. no 's'
The plural of 'echo' is 'echoes.'
The plural form of the word "echo" is "echoes."
The plural form is echoes. The plural possessive is echoes'.
Continuously repeating echoes in a room are known as reverberation.Where the echo is distinct, it is just an echo
The plural form for the noun echo is echos.
echoes
The plural form of the noun echo is echoes.The plural possessive form is echoes'.
The children shouted, and then listened for their echoes to come back from the hillsWe shouted our names in the canyon, and listened to the echo. The children shouted, and then listened for their echoesto come back from the hills.