Computer Science, asked by ankuryadav2001, 6 months ago

Print the following pattern
Pattern for N = 4
output must be like this
1
23
345
4567

Answers

Answered by Askyoguyboutme
1

Answer:

is it C?

Explanation:

#include<stdio.h>

#include<conio.h>

void main()

{

 int rows,i,j,k=0;

 printf("Enter number of rows: ");

 scanf("%d",&rows);

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

 {

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

 printf("%d ",k+j);

 ++k;

 printf("\n");

 }

 getch();

}

Expected Output:

Enter the number of rows: 4

1

23

345

4567

56789

I may be wrong mate, but good question!

Similar questions