Pattern 15: C Program to print Irregular polyhedron star pattern with out spaces.

Write a C program to print the following Irregular polyhedron star pattern :

In this Article, We are going to print the Irregular polyhedron star pattern using the for loops. We will two for loops Outer For loop and inner for loop. Outer for will helps us to print the Rows. And Inner for loop will helps us to print the columns

* * * * *
* * * *
* * *
* *
*
*
* *
* * *
* * * *
* * * * *

Seems like Above output is not displaying properly. Here is the expected output in Image Format.

Polyhedron-Star-pattern-without-spaces

Note: This program is the similar program to Pattern 14 but without the spaces in between two triangles.

Here I am using continue keyword, It will take the execution of the program to next iteration on other words it simply skips the execution of present iteration and goes to next iteration. So in pattern 14 program iteration 0 is causing spaces, So I am just skipping that iteration by using continue.

Irregular polyhedron star pattern Program:

Output :

Irregular-polyhedron-star-pattern-program-in-c

Note: If you want spaces in between two triangles just delete continue statement in the loop, Please Refer to the following post for more details. “Polyhedron with spaces”.

Related Programs :

More C programs:

C Tutorials with simple Examples:

Venkatesh

Hi Guys, I am Venkatesh. I am a programmer and an Open Source enthusiast. I write about programming and technology on this blog.

You may also like...

1 Response

  1. […] Pattern 15: Polyhedron Star Pattern – 2 […]

Leave a Reply