Write a program to construct step of block.
#include <stdio.h>
#include <conio.h>
void main ( )
{
int i, j, k, l, m = 10;
clrscr ( );
printf ("\n\t\t\t Design of step of block\n\n\n\n");
for ( i = 1; i <= 6; i++ )
{
for ( j = 1; j <= 6; j++ )
{
for ( l = 1; l < m; l++ )
{
printf(" ");
}
for ( k = 1; k <= 6; k++ )
{
printf ("* ");
}
printf ( "\n" );
}
m = m + 8;
}
getch( );
}
Click here to contact us
Write a program to construct step of block from reverse side.
#include <stdio.h>
#include <conio.h>
void main ( )
{
int i, j, k, l, m = 50;
clrscr ( );
printf ("\n\t\t\t Design of step of block\n\n\n\n");
for ( i = 1; i <= 6; i++ )
{
for ( j = 1; j <= 6; j++ )
{
for ( l = 1; l < m; l++ )
{
printf(" ");
}
for ( k = 1; k <= 6; k++ )
{
printf ("* ");
}
printf ( "\n" );
}
m = m - 8;
}
getch( );
}
Click here to contact us
No comments:
Post a Comment