Computer and Information Technology notes
Home
Programs »
Java Programs
C Programs
Shell Programs
Practical Programs »
Data Structures
Web Programming
ComputerNetwork
DBMS
OperatingSystem
OpenSource(OST)
ComputerGraphic
Microcontroller
Advanced DBMS
SWS
E-books »
First Year
Computer
I.T.
Mumbai University »
Question Paper
Solved Programs
Sitemap
Placements
Shell Program - Check whether the given number is even or odd.
CODE:
#! /bin/bash
echo "Enter a number"
read a
if test `expr $a % 2` -eq 0
then
echo "$a is even number"
else
echo "$a is odd number"
fi
OUTPUT:
No comments :
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments ( Atom )
No comments :
Post a Comment