/* program to print output as ***
* 9 *
* 89 *
* 789 *
* 6789 *
*********************************/
#include
#include
void main()
{
int i,j;
unsigned int num;
clrscr();
printf("enter any positive integer number less thna or equal to 9");
scanf("%d",&num);
for(i=num;i>=1;i--)
{
for(j=1;j<=num;j++)
{
if(j
printf(" ");
else
printf("%d",j);
}
printf("\n");
}
getch();
}
#include
void main()
{
int i,j;
unsigned int num;
clrscr();
printf("enter any positive integer number less thna or equal to 9");
scanf("%d",&num);
for(i=num;i>=1;i--)
{
for(j=1;j<=num;j++)
{
if(j
printf(" ");
else
printf("%d",j);
}
printf("\n");
}
getch();
}
No comments:
Post a Comment