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
(a) Define a procedure called make-avl-tree which makes an AVL tree with one node. Also create another constructor build-avl-tree that creates an AVL tree from a root, left subtree
W.A.S.S to find the maximum of three numbers Program # W.A.S.S to find the maximum of three numbers echo "Enter three No.:" read no1 read no2 read no3 if test $no1 -gt $n
Your task is to write an application to analyse texts in a file. Your application will employ several kinds of text-analyser objects (which you also have to implement) as descri
A non-empty string is called a minimal unique substring of s if and only if it satisfies: (i) α occurs exactly once in s (uniqueness), (ii) all proper prefixes of occur at le
Write a Prolog predicate remove_nth(N,L1,L2) that is true if list L2 is just list L1 with its Nth element removed. If L1 does not have an Nth element then the predicate should fail
Calculate the total price to purchase all the components required to build a state-of-the-art gaming computer from components available on the internet. Before attempting this exer
The method should call getAllCities() and return the index of the City that has the shortest (euclidian) distance to the. longitude and latitude passed as parameters
Write a program to show ten buttons with five possible colors: red, green, orange, yellow, blue. When the user clicks on a button, its color must advance to the next color, or go b
Consider a system that has the following UML models: Use Case for CalculateTotalProjectCost Trigger: End of each month Normal Flow of Events For each project in the pro
We want to create a structure that will represent a deck of cards (not necessarily full). Each card has a character (between '2' to '9' and 'T', 'J', 'Q', 'K', 'A') and a suit (dia
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