Write a C program to print plus star pattern series using for loop. How to print plus star pattern series using loop in C program. Logic to print plus star pattern in C programming.
Required knowledge
Basic C programming, If else, For loop, Nested loop
Logic to print plus star pattern
Take a close look about the pattern and identify some noticeable things about it. Here are some.
- The pattern consists of
N * 2 - 1
rows. - When you look to the center horizontal plus line i.e. +++++++++ this line. It also consists of
N * 2 - 1
columns. - For every other row, single plus symbol is printed after
N - 1
blank spaces.
Based on the above observation let us write a C program to print plus star pattern.
Program to print plus star pattern series
Output
Enter N: 5 + + + + +++++++++ + + + +
Happy coding
Recommended posts
- Star patterns programming exercises index.
- Number pattern programming exercises index.
- Loop programming exercises index.
- Recommended patterns –
* * * * * * * * * * * * * * * * *
*** * * * * * * *** * * * * * * ***
***** ***** ******* ******* ********* ********* ******************* ***************** *************** ************* *********** ********* ******* ***** *** *
***** ***** ******* ******* ********* ********* *****Codeforwin**** ***************** *************** ************* *********** ********* ******* ***** *** *