Write a program to construct the image shown below.
123456789
12345678
1234567
123456
12345
1234
123
12
1
#include <stdio.h>
#include <conio.h>
void main ( )
{
int i, j, k;
clrscr ( );
printf ("\n\t\t\t Design of Numbers");
printf ("\n\n\n");
for ( i = 9; i >= 1; i-- )
{
for ( k = 21; k >= i; k-- )
{
printf (" ");
}
for ( j = 1; j <= i; j++)
{
printf ("%d ", j);
}
printf ("\n");
}
getch ( );
}
Click here to contact us
123456789
12345678
1234567
123456
12345
1234
123
12
1
#include <stdio.h>
#include <conio.h>
void main ( )
{
int i, j, k;
clrscr ( );
printf ("\n\t\t\t Design of Numbers");
printf ("\n\n\n");
for ( i = 9; i >= 1; i-- )
{
for ( k = 21; k >= i; k-- )
{
printf (" ");
}
for ( j = 1; j <= i; j++)
{
printf ("%d ", j);
}
printf ("\n");
}
getch ( );
}
Click here to contact us
No comments:
Post a Comment