All pastes #980819 Raw Edit

Etwas

public text v1 · immutable
·published 2008-04-11 09:27 UTC
rendered paste body
/*
 * asignment33
 * dreieck.c
 * waigel.jan-erik
 * 04.04.08
 *
 * *
 * **
 * ***
 *
 */
 
#include<stdio.h>

int star( int x )
{
   int y=0;
   
   while ( y < x )
   {
      printf( "*" );
      y=y+1;
   }
   
   return 0;
}

int space()
{
   printf( " " );
   return 0;
}

int newline()
{
   printf( "\n" );
   return 0;
}
 

int main()
{
   
   int a=0;
   int x=1;
   
   
   printf( "a: " );
   scanf( "%d", &a );
   
   
   
   //printf ("a=%d x=%d\n", a,x);
   
   while ( x < a+1  )
   {
      star( x );
      newline();
     
      x=x+1;
   }
   
   return 0;
}