Computer Science, asked by abhishek585858, 11 months ago

To print chirsmas pattern in c++ programing​

Answers

Answered by aalaparunp66okp
0

#include<iostream.h>

#include<conio.h>

void main()

{

int i, j;

int x = 5;

int y = 1;

for(j = 1; j <= 5; j++)

{

   for(i = 1; i <= x; i++)

   {

      cout << " ";

   }

   x--;

   for(i = 1; i <= y; i++)

   {

   cout << "*";

   }

   y += 2;

   cout << endl;

}

      getch();

}

Hope this helps

Similar questions