recategorized by
236 views
0 votes
0 votes
Iam unable to execute the code below please help me to solve this and to execute.

0
909
89098
7890987
678909876
56789098765
4567890987654
345678909876543
23456789098765432
1234567890987654321

#include<stdio.h>

int main()
{
  int i,j;
  printf("0\n");
  for(i=9;i<=1;i--)
  {
    for(j=i;j>=9;j++)
      printf("%d",j);
    printf("0");
    for(j=9;j>=i;j--)
      printf("%d",j);
    printf("\n");
  }
  return 0;
}
recategorized by

1 Answer

0 votes
0 votes

int main()
{
  int i,j;
  printf("0\n");
  for(i=9;i>=1;i--)
  {
    for(j=i;j<=9;j++)
      printf("%d",j);
    printf("0");
    for(j=9;j>=i;j--)
      printf("%d",j);
    printf("\n");
}
    return 0;
}

Related questions

2 votes
2 votes
1 answer
1
0 votes
0 votes
1 answer
2
0 votes
0 votes
1 answer
3