Program to print the stars in a sequence in C Plus Plus(C++, CPP) and C with flowchart
Sequence of stars must be in followings order;
In this tutorial, we will learn about the followings;
- Flowchart of program to print the stars in a sequence
- Program to print the stars in a sequence in C Plus Plus(C++, CPP)
- Program to print the stars in a sequence in C
Flowchart of the program to print the stars in a sequence
Coming Soon.
Program to print the stars in a sequence in C Plus Plus(C++, CPP)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
#include <stdio.h> int main() { int i, j, k; for(i=1;i<=5;i++) { for(j=i;j<5;j++) { printf(" "); } for(k=1;k<(i*2);k++) { printf("***"); } printf("\n"); } return 0; } |
Output

Program to print the stars in a sequence in C
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
#include <stdio.h> int main() { int i, j, k; for(i=1;i<=5;i++) { for(j=i;j<5;j++) { printf(" "); } for(k=1;k<(i*2);k++) { printf("***"); } printf("\n"); } return 0; } |
Output
