print C
#include <stdio.h>
void main() //@codewithsandhan
{
int i, j, a, k, l;
printf("Enter a number : ");
scanf("%d", &a);
for (i = 1; i <= a; i++)
{
if (i == 1)
{
for (j = 1; j <= 110 * a / 70; j++)
{
if (j < 100 * a / 130)
{
printf(" ");
}
else
{
printf("\U0001F921");
}
}
}
if (i == a)
{
for (j = 1; j <= 110 * a / 70; j++)
{
if (j < 100 * a / 130)
{
printf(" ");
}
else
{
printf("\U0001F921");
}
}
}
printf("\n");
if (i < a / 4)
{
for (k = 1; k < a / 4 - i; k++)
{
printf(" ");
}
printf("\U0001F921\n");
}
if (i >= a / 4 && i <= 3 * a / 4)
{
printf("\U0001F921\n");
}
if (i > 3 * a / 4 && i < a)
{
for (l = 1; l < i - 3 * a / 4; l++)
{
printf(" ");
}
printf("\U0001F921");
}
printf("\n");
}
Comments
Post a Comment