Star Pyramid In C
#include<stdio.h> #include<conio.h> void main() { int i,j,k; clrscr(); for(i=1;i<=5;i++) { for(k=1;k<=5-i;k++) { printf(" "); } for(j=1;j<=i;j++) { printf(" *"); } printf("\n"); } getch(); } Output:
#include<stdio.h> #include<conio.h> void main() { int i,j,k; clrscr(); for(i=1;i<=5;i++) { for(k=1;k<=5-i;k++) { printf(" "); } for(j=1;j<=i;j++) { printf(" *"); } printf("\n"); } getch(); } Output:
A simple C program to print a right triangle pattern by using stars. There are various types of patterns. But i will be uploading the important patterns that will help…