Computer Science, asked by AdishaDeo, 1 year ago

Pls guys answer this.

Attachments:

AngshumanRoy: first tell me is it a 2 side pattern pro gram
AngshumanRoy: ???????
AdishaDeo: Yeah

Answers

Answered by varunmadkaikar
1

#include<stdio.h>

#include<conio.h>

int main()

{

int num,r,c,sp;

printf("Enter loop repeat number : ");

scanf("%d",&num);

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

{

for(sp=r; sp>1; sp--)

printf(" ");

for(c=r; c<=num; c++)

printf("%d",c);

for(c=num-1; c>=r; c--)

printf("%d",c);

printf("\n");

}

getch():

return 0;

}


AdishaDeo: Thanks for the help.
AdishaDeo: But do u know to do it in 2 d array???
AdishaDeo: Its not that important
Similar questions