Pattern Programing in C Language using Loop

 Welcome To New Blog


All program in C language.

1. Pattern like this

1

1 2

1 2 3

1 2 3 4

1 2 3 4 5

Input Code:-

#include<stdio.h>

int main()

{

int r,i,j;

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

scanf("%d", &r);

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

{

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

{

printf("%d", j);

}

printf("\n");

}

return 0;

}

Output:- 



Comments