Virajsinh

Pyramid_2_OS_Script

Oct 7th, 2017
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. echo "Pyramid 2"
  2. echo -n "Enter Num Of Pyramid : "
  3. read n
  4.  
  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 " *"
  15. done
  16. echo " "
  17. done
Add Comment
Please, Sign In to add comment