2,3,5,7,9,11,13,17,19,23,29,31,37,39,41,43,47,49
Chat with our AI personalities
There are several shell programs available for download on the Internet that will generate prime numbers. The best way to find a prime number is through calculation, however.
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
#!/bin/Bash echo "Enter the two numbers to be Multiplied:" read n1 read n2 answer=`expr $n1 \* $n2` echo $answer
shell
PHP is a server-side scripting language that can be used to dynamically generate the content of web sites served up to a client. It can also be used for local shell scripting. PHPMyAdmin is a PHP based web interface for managing MySQL databases.