050
Write a C Program to print the Following Pattern?
1234567
12345
123
1
#include<stdio.h>
void main ()
{
int width = 7;
int p_space = width / 2;
int p_height = width - p_space;
int i, j, k;
for (i = p_height; i >= 1; i--)
{
for (j = p_space; j >= i; j--)
printf (" ");
for (k = 1; k <= width; k++)
printf ("%d", k);
width -= 2;
printf ("\n");
}
}
051
Write a C Program to print the Following Pattern?
DDDDDDD
CCCCC
BBB
A
#include<stdio.h>
void main ()
{
int width = 7;
int p_space = width / 2;
int p_height = width - p_space;
int i, j, k;
for (i = p_height; i >= 1; i--)
{
for (j = p_space; j >= i; j--)
printf (" ");
for (k = 1; k <= width; k++)
printf ("%c", (width - i) + 65);
width -= 2;
printf ("\n");
}
}
052
Write a C Program to print the Following Pattern?
GGGGGGG
EEEEE
CCC
A
#include<stdio.h>
void main ()
{
int width = 7;
int p_space = width / 2;
int p_height = width - p_space;
int i, j, k;
for (i = p_height; i >= 1; i--)
{
for (j = p_space; j >= i; j--)
printf (" ");
for (k = 1; k <= width; k++)
printf ("%c", (width - 1) + 65);
width -= 2;
printf ("\n");
}
}
053
Write a C Program to print the Following Pattern?
ABCDEFG
ABCDE
ABC
A
#include<stdio.h>
void main ()
{
int width = 7;
int p_space = width / 2;
int p_height = width - p_space;
int i, j, k;
for (i = p_height; i >= 1; i--)
{
for (j = p_space; j >= i; j--)
printf (" ");
for (k = 0; k < width; k++)
printf ("%c", k + 65);
width -= 2;
printf ("\n");
}
}
054
Write a C Program to print the Following Pattern?
*
* *
* * *
* * * *
* * * * *
* * * *
* * *
* *
*
#include<stdio.h>
void main ()
{
int size = 4;
int i, j;
for (i = size; i >= -size; i--)
{
for (j = size; j >= abs (i); j--)
printf ("* ");
printf ("\n");
}
}
055
Write a C Program to print the Following Pattern?
4
4 3
4 3 2
4 3 2 1
4 3 2 1 0
4 3 2 1
4 3 2
4 3
4
#include<stdio.h>
void main ()
{
int size = 4;
int i, j;
for (i = size; i >= -size; i--)
{
for (j = size; j >= abs (i); j--)
printf ("%d ", j);
printf ("\n");
}
}
056
Write a C Program to print the Following Pattern?
3
2 3
1 2 3
0 1 2 3
1 2 3
2 3
3
#include<stdio.h>
void main ()
{
int size = 3;
int i, j;
for (i = size; i >= -size; i--)
{
for (j = abs (i); j <= size; j++)
printf ("%d ", j);
printf ("\n");
}
}
057
Write a C Program to print the Following Pattern?
E
E D
E D C
E D C B
E D C B A
E D C B
E D C
E D
E
#include<stdio.h>
void main ()
{
int size = 4;
int i, j;
for (i = size; i >= -size; i--)
{
for (j = size; j >= abs (i); j--)
printf ("%c ", j + 65);
printf ("\n");
}
}
058
Write a C Program to print the Following Pattern?
E
D E
C D E
B C D E
A B C D E
B C D E
C D E
D E
E
#include<stdio.h>
void main ()
{
int size = 4;
int i, j;
for (i = size; i >= -size; i--)
{
for (j = abs (i); j <= size; j++)
printf ("%c ", j + 65);
printf ("\n");
}
}
059
Write a C Program to print the Following Pattern?
*
* *
* * *
* * * *
* * * * *
* * * *
* * *
* *
*
#include<stdio.h>
void main ()
{
int size = 4;
int i, j, k;
for (i = size; i >= -size; i--)
{
for (j = 1; j <= abs (i); j++)
printf (" ");
for (k = size; k >= abs (i); k--)
printf ("* ");
printf ("\n");
}
}
.png)