Computer Science, asked by rushilgupta1711, 4 months ago

Write a program to print pattern
*
**
***
****
*****​

Answers

Answered by h4hero2004p4r7sq
1

Answer:

In C language:

#include <stdio.h>

int main()

{

   int a;

   printf("How many lines do you want? ");

   scanf("%d", &a);

   for(int i = 1; i <= a; i++)

   {

       for(int j = 0; j < i; j++)

       {

           printf("*");

       }

       printf("\n");

   }

   return 0;

}

OUTPUT:

How many lines do you want? 5

*

**

***

****

*****​

Answered by mandeeprani259
0

Answer:

I don't like computer of so don't ask questions

Similar questions