Thursday, 19 December 2019

Full Pyramid


#===================================
# Tanzila Islam
# Email: tanzilamohita@gmail.com
#===================================

read n
for((i=1; i<=n; i++))
do
  for((j=1; j<=n-i; j++))
  do
    echo -n "  "
  done
  for((j=1; j<=2*i - 1; j++))
  do
    echo -n "* "
  done
  echo
done

No comments:

Post a Comment