Computer Science, asked by bhoomi0422, 6 months ago

3. WRITE A PROGRAMME TO PRINT THE FOLLOWING PATTERN
*
**
***
****​

Answers

Answered by kaushikvidhu2004
1

Answer:

Explanation:

#include <stdio.h>

int main() {

  int i, j, rows;

  printf("Enter the number of rows: ");

  scanf("%d", &rows);

  for (i = 1; i <= rows; ++i) {

     for (j = 1; j <= i; ++j) {

        printf("* ");

     }

     printf("\n");

  }

  return 0;

}

Answered by ScienceMathsLover
1

Answer:

This program which I have written is for Java..

Explanation:

public class pattern

{

public static void main()

{

System.out.println("/u000c");//clears screen

System.out.println("*");

System.out.println("**");

System.out.println("***");

System.out.println("****");

}//class ends

}//main ends

Hope this helps...

Pls mark me Brainliest and follow me for more answers with explanation..

Similar questions