Write a shell program to test whether a given number is even
or odd?
Answer Posted / karishma
echo -n "Enter numnber : "
set number = $<
set rem=expr( $number % 2 )
if($rem -eq 0)
then
echo "$number is even number"
else
echo "$number is odd number"
endif
| Is This Answer Correct ? | 19 Yes | 19 No |
Post New Answer View All Answers
Is shell and terminal the same?
What are the advantages of shell script?
How will you connect to a database server from linux?
what is info area how many types?
Suppose you execute a command using exec, what will be the status of your current process in the shell?
What is the default shell of solaris?
how to print the 2-d, 3-d arrays in unix shell script programs please answer thi questio to my mail venusaikumar@gmail.com
Is shell a part of kernel?
How can I set the default rwx permission to all users on every file which is created in the current shell?
What is the first line in every perl script called?
Which is better perl or shell scripting?
What is a shell? · Types of shell · what is shell scripting?
What is shell scripting?
Why are there shells on the beach?
What is a program shell?