Dohaskell’s Weblog

May 22, 2008

code test

Filed under: c/c++ — dohaskell @ 11:42 pm

source

 

/*
     27  * @description
     28  *
     29  *      ***
     30  *     ***
     31  *    ***
     32  */
     33 void washboard(int lines)
     34 {
     35     int i = 0;
     36     int jines;
     37
     38     for(i = 0 ;i < lines ;i++) {
     39         for(j = 0 ;j < lines ;j++) {
     40             if(j<lines-i-1)
     41                 printf(” “);
     42             else break;
     43         }
     44         for(j=(lines-i-1) ;j < (2*lines-i-1) ;j++) {
     45             printf(“*”);
     46         }
     47         printf(“\n”);
     48     }
     49 }
     50

1 Comment »

  1. dddd

    Comment by dohaskell — May 22, 2008 @ 11:46 pm


RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.