The Matriculation school have arranged an Annual Day Function.
#include <stdio.h>
int main()
{
int rows;
int i,j;
scanf("%d",&rows);
for(i=1;i<=rows;i++)
{
for(j=1;j<=i;j++)
{
if(i==1||j==1||i==rows||i==j)
{
printf("1 ");
}
else
{
printf("0 ");
}
}
printf("\n");
}
return 0;
}
0 Comments
if you have any doubt, plz let me know