triangle using an array

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sanzi4
    New Member
    • Dec 2008
    • 2

    triangle using an array

    how to write a c program that prints a triangle of a given size using an array whose elements represent the number of stars(*)forming the triangle. for example if the size is 5
    output wll be

    *
    **
    ***
    ****
    *****
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    somehow I'm having a flashback.... It's probably a good idea to read the Posting Guidelines (trust me)

    regards

    Comment

    • sanzi4
      New Member
      • Dec 2008
      • 2

      #3
      i know how 2 do the triangle i just need it with an array !!!

      Comment

      • svlsr2000
        Recognized Expert New Member
        • Feb 2007
        • 181

        #4
        can you elaborate the question? This might help everyone to understand your need.

        Comment

        • JosAH
          Recognized Expert MVP
          • Mar 2007
          • 11453

          #5
          Originally posted by sanzi4
          i know how 2 do the triangle i just need it with an array !!!
          Do you want the numbers 1,2,3 ... n stored in an array for a given n > 0? That'd be programming 101. And please don't shout.

          kind regards,

          Jos

          Comment

          Working...