Write a shell program to test whether a given number is even
or odd?
Answer Posted / rk
echo"enter number"
read n
set r=($n%2)
if(r eq-0)
then
echo "even number:$n"
else
echo "odd number:$n"
fi
| Is This Answer Correct ? | 24 Yes | 16 No |
Post New Answer View All Answers
What are the different commands available to check the disk usage?
wats the deinitions for shell utility and filter?
What language is used in terminal?
What are the different variables present in linux shell?
How to calculate the number of passed arguments?
What is a shell script in windows?
Calculate a real number calculation directly from the terminal and not any shell script.
What are "c" and "b" permission fields of a file?
What is shell geeksforgeeks?
Write a command sequence to find all the files modified in less than 2 days and print the record count of each.
Tell something about the super block in shell scripting?
How do I run a .sh file on mac?
How do you find out What is your shell?
How can I send a mail with a compressed file as an attachment?
What is subshell?