Computer Science, asked by ChalasaniVyshnavi, 11 months ago

write a program using functios to print a right angled equilateral triangle in the series of 1, 6, 21, 45,...​

Attachments:

Answers

Answered by pradeepmishragzb
0

Answer:

print triangle(20)

function triangle(num)

ctr = 1

b = 0

while ctr < num

 b = b + 1

 for a = 1 to b

  print "*";

  ctr = ctr + 1

 next a

 print

end while

end function

Explanation:

This function is written in basic 256 and prints "*" characters

Similar questions