#!/bin/sh
echo -n "Enter First No. of G.P : "
read a
echo -n "Enter Common Ratio of G.p :"
read r
echo -n "how many no. you want to print : "
read n
echo " .............G.p is : ........ "
while [ $n -gt 0 ]
do
echo -n "$a "
a=$(($a*$r))
n=$(($n-1))
done
exit 0
No comments:
Post a Comment