Write a C++ Program for displaying logical output
#include
#include
void main()
{
int i,j,num,space,k;
clrscr();
printf("Enter the number:-");
scanf("%d",&num);
k=num;
for(i=num;i>=0;i--)
{
for(space=k;space>0;space--)
{
printf(" ");
}
for(j=num -(i-1);j>=1;j--)
{
printf("%d ",i);
}
printf("\n");
k--;
}
getch();
}