Skip to main content

Print the hollow diamond pattern

Here given code implementation process.

Given a size N which indicates star symbol on each side, Our goal is to print the hollow diamond pattern of specified size. For example.

 Given n : 5
          ✰
        ✰   ✰
      ✰       ✰
    ✰           ✰
  ✰               ✰
    ✰           ✰
      ✰       ✰
        ✰   ✰
          ✰

 Given n : 8
                ✰
              ✰   ✰
            ✰       ✰
          ✰           ✰
        ✰               ✰
      ✰                   ✰
    ✰                       ✰
  ✰                           ✰
    ✰                       ✰
      ✰                   ✰
        ✰               ✰
          ✰           ✰
            ✰       ✰
              ✰   ✰
                ✰




Comment

Please share your knowledge to improve code and content standard. Also submit your doubts, and test case. We improve by your feedback. We will try to resolve your query as soon as possible.

New Comment