Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
W.A.S.S to check that whether a given number is prime or not.
Program
# W.A.S.S to check that whether a given number is prime or not.
echo -e " enter number \c"
read number
i=2
flag=0
while test $i -lt $number #starts from 2 to number-1
do
if test `expr $number % $i` = 0 #if the no is completely divisible by i
then
flag=1
break
fi
i=`expr $i + 1`
done
if test $flag = 0
echo "Number is prime"
else
echo "Number is not prime"
Output
enter number 55
Number is not prime
enter number 13
Number is prime
enter number 21
This assignment is an individual programming assignment using Perl. It addresses objectives 3, 4, 5 and 8 as listed in the Subject Outline document. The assignment is based on them
Redundant sequence identification: Given a set of k DNA sequences, S = { s 1, s 2, ... , s k } give an optimal algorithm to identify all sequences that are completely contained
The creation of the menu will involve writing procedural code, using decision logic, writing a loop, and using the case statement. Although it is not required for grading, it is r
Explain the Continue statement - Computer Programming? This is alike to break but is encountered less frequently. It merely works within loops where its effect is to force an imm
n2=2:100; t=3; while t { g3(t)=(1/2)*(0.63)*(0.8.^(n2)); t=t+1; } g3(1)=0; g3(2)=0; what is wrong with the code above? it tells me that line: g3(t)=(1/2)
Provide Example of Function? An illustration of a function definition main() { message(); } /* header */ message() { /*bodystarts here*/ printf ("Example for function
Input to be in the form of a string of less than 256 characters. Assume that this character string (record) can only be of the form: Last Name, First Name, Box number, City, St
Write a function that converts a character array to a signed floating point number. Function prototype must be as follows: int asciiToFloat( char *str, unsigned char* eflag) Follow
Write a booking and pricing system for seats for performances in a theatre. Design and write a system to handle information (equipment, people, events etc.) for a club. Given
Define Functions with no arguments and no return values? When a function has no arguments it doesn't receive any data from the calling function. Likewise, it doesn't return any
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd