26 lines
419 B
C
26 lines
419 B
C
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
|
|
int main(void)
|
|
{
|
|
int hauteur = 0;
|
|
|
|
printf("Hauteur ? ");
|
|
scanf("%d", &hauteur);
|
|
|
|
for (int i = 0; i < hauteur; i++)
|
|
{
|
|
int espace = hauteur - i;
|
|
printf("%*c", espace, '*');
|
|
|
|
if (i != 0)
|
|
{
|
|
for (int j = 0; j < i * 2; j++)
|
|
{
|
|
printf("*");
|
|
}
|
|
}
|
|
|
|
printf("\n");
|
|
}
|
|
} |