Write c shell script to check the no is prime or not

Updated: Mar 18


c shell shell script to check the no is prime or not

@ i= 2
echo "\n enter the no to check prime"
@ n = $<
 
while ( $i < $n )
            if ( $n % $i == 0 ) then
                        @ f = 0
                                    break
            else
                        @ f = 1
endif
            @ i++
end
if ( $f == 1 ) then
            echo "the given no. is prime"
else
echo "not a prime no."
endif




#ShellScript #UNIX

Contact Us

Tel: (+91) 0120  4118730  

Time :   10 : 00  AM -  08 : 00 PM IST 

Registered address: G-69, Sector 63, 

 Noida - 201301, India

We Provide Services Across The different countries

USA    Australia   Canada   UK    UAE    Singapore   New Zealand    Malasia   India   Ireland   Germany

Terms and Conditions        Privacy Policy    Pricing Policy       Refund Policy         COPYRIGHT © 2021

Sofstack Technology Solutions Pvt. Ltd.

  • CodersArts | Linkedin
  • Instagram