Pattern (1 232 34543.......) |
#include<stdio.h>
int main()
{
int row,i,n;
printf("Enter the row numbers:");
scanf("%d",&n);
for(row=1; row<=n; row++)
{
for(i=1; i<=n-row; i++)
printf(" ");
for(i=row; i<=2*row-1; i++)
printf("%d",i%10);
for(i=2*row-2; i>=row; i--)
printf("%d",i%10);
printf("\n");
}
return 0 }
By: JUWEL RANA
No comments:
Post a Comment