Category Archives: C Loop Programs Star Patterns

Print star diamond pattern

“Print star diamond pattern” is a star pattern program in C language to give the required output. This program uses for loop concept in C programming language and prints the diamond of stars according to given input about number of rows. This C program uses the following set of statements: Pre processor directives to include… Read More »

Print star pattern center down triangle

“Print star pattern center down triangle” is C language program using nested for loop concept. It displays the required output of stars pattern as shown in the figure.   /* Write a C program to print star pattern triangle as shown below ********* ******* ***** *** * */ #include<stdio.h> int main() { int row, col,… Read More »

Print star triangle center pattern

“Print star triangle center pattern” is C program to print the given output of stars pattern as shown below: /* Write a C program to print star pattern triangle as shown below * *** ***** ******* ********* */ #include<stdio.h> int main() { int row, col, space=5, s; for( row = 1; row <= 9;row+=2 )… Read More »

Print star pattern triangle upside down

Print star pattern triangle is a C program to display the following out put star pattern. It is upside down triangle of stars made by c program. It is upside down triangle c program. /* Write a C program to print star pattern triangle as shown below. ***** **** *** ** * */ #include<stdio.h> int main()… Read More »

Star pattern Right Angle Triangle

Star pattern Right Angle Triangle is a C program to display right angle triangle of stars using nested for loop. /* Write a C program to print star pattern triangle as shown below * ** *** **** ***** */ #include<stdio.h> int main() { int row, col, space=4, s; for( row = 1; row <= 5;row++)… Read More »

Print Star Pattern Left Inverted Triangle

“Print Star Pattern Left Inverted Triangle” is a C program using nested for loop. It displays a triangle of star pattern. /*Write a C Program to print the following Star Pattern ***** **** *** ** * */ #include <stdio.h> int main() { int row, col; for(row=5;row>=1;row–) { for(col=1;col<=row;col++) { printf(“*”); } printf(“\n”); } return 0;… Read More »

Print Star Pattern Triangle using loop

Print Star Pattern Triangle using loop is a C program. It prints a right angle triangle of stars as following: * ** *** ***** ****** /*Write a C Program to print the following Star Pattern * ** *** **** ***** */ #include <stdio.h> int main() { int row, col; for(row=1;row<=5;row++) { for(col=1;col<=row;col++) { printf(“*”); }… Read More »