Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /bin/bash
- echo -n "Enter the number of rows: "
- read n
- count=1
- for(( i=0; i<$n; i++ )){
- for(( space=$n-$i-1; space>=0; space-- )){
- echo -n " "
- }
- for(( j=0; j<=i; j++ )){
- echo -n "$count "
- let count+=1
- }
- echo ""
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement