All pastes #754990 Raw Edit

Anonymous

public text v1 · immutable
#754990 ·published 2007-10-30 11:20 UTC
rendered paste body
#include <stdio.h>

int main(void)
{
  int i,x,s,c,max;
  
  while(max>50) {
      printf("Entrez la largeur (Limite a 50): \n");
      scanf("%d", &max);
      printf("\n\n\n");
  }
  
  for(i=0 ; i < max ; i++)
  {
          c=1;
          for(x=0 ; x < max ; x++)
          {
                  if((max*2-i*2)/2 == x)
                  {
                         for(s=0 ; s<=(i*((3+1)/2)-1)+(i*((3+1)/2)-1)-1 ; s++,s++) {
                                     putchar('*');
                         }
                         c=0;
                  } else if(c) {
                         putchar(' ');
                  }
          }
          putchar('\n');
  }
  system("pause");
}