Program to print stars patterns (2)

इस प्रोग्राम में हम सीखेंगे कि किस तरह हम C प्रोग्रामिंग में stars को एक पैटर्न्स के रूप में कैसे प्रिंट कर सकते है , इसके लिए हम nested for लूप का प्रयोग करेंगे (यह stars पैटर्न्स का दूसरा प्रोग्राम है)

#include<stdio.h>
#include<conio.h>
void main()
{
  int i,j,k;
  clrscr();
  for(i=1;i<=5;i++)
  {
    
    for(j=5;j>=i;j--)
    printf(" ");
    for(k=1;k<=i;k++)
    printf("*");
    printf("\n");
  }
  getch();
}

Output:
*
**
***
****
*****


error: Content is protected !!