diff --git a/program/program/print-inverted-pyramid-pattern/print-inverted-pyramid-pattern.jl b/program/program/print-inverted-pyramid-pattern/print-inverted-pyramid-pattern.jl new file mode 100644 index 000000000..c20162237 --- /dev/null +++ b/program/program/print-inverted-pyramid-pattern/print-inverted-pyramid-pattern.jl @@ -0,0 +1,12 @@ +function print_inverted_pyramid(n) + for i in 1:n + for j in 1:(n-i+1) + print(j, " ") + end + println() + end +end + +# sending parameters to function +n = 5 +print_inverted_pyramid(n)