Skip to main content
C program to print number pattern 2
/*
Write a C program to implement the number pattern 2
0
12
345
6789----------------------*/
#include<stdio.h>
int main()
{
printf("The number pattern is:\n");
int i,j,k=0;
for(i=0;i<4;i++)
{
printf("\n");
for(j=0;j<4;j++)
{
if(i>=j)
printf("%d ",k++);
else
printf(" ");
}
}
}
Output:
🔥🔥
ReplyDelete