Virajsinh

Pyramid_4_OS_Script

Oct 7th, 2017
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. echo "Pyramid 4"
  2. echo -n "Enter Num Of Pyramid : "
  3. read n
  4. m=1
  5. for (( i=1; i<=$n; i++ ))
  6. do
  7. for (( k=n; k>$i; k-- ))
  8. do
  9. echo -n " "
  10. done
  11.  
  12. for (( j=1; j<=$i; j++ ))
  13. do
  14. echo -n " $m"
  15. m=`expr $m + 1`
  16. done
  17. echo " "
  18. done
Add Comment
Please, Sign In to add comment