fork download
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. static const char s[] = "########################"; // note: 24 x
  6. unsigned int size = 0, i;
  7.  
  8. if (scanf("%u", &size) == 1 && size > 0 && size < 24)
  9. {
  10. for (i=0; i<size; ++i)
  11. printf("%*.*s\n", size+1, i+2, s);
  12. }
  13. }
  14.  
Success #stdin #stdout 0s 2056KB
stdin
23
stdout
                      ##
                     ###
                    ####
                   #####
                  ######
                 #######
                ########
               #########
              ##########
             ###########
            ############
           #############
          ##############
         ###############
        ################
       #################
      ##################
     ###################
    ####################
   #####################
  ######################
 #######################
########################