echo "Enter the m And n"
read m n
#Script to find m power n power=1
for((i=1; i <= n; i++))
do
power=`expr $power \* $m`
done
echo "$m power $n = $power"
OUTPUT
csc@csc-SVE1513CYNB ~ $ bash power.sh
Enter the m And n
4 3
4 power 3 = 64
Programming is an art and skill that can be calibrated by learning the different ways to apply logic to a solution. This blog helps the beginner level programmers and computer science graduates to acquire programming skill easily by learning a program a day. They can also try to rewrite the same program in a more efficient way. This will boost up their programming knowledge.
No comments:
Post a Comment