fork(1) download
  1. #include <math.h>
  2. #include <stdio.h>
  3.  
  4. void clover(float l, float r)
  5. {
  6. float dx = 1.f / --r, dy = 2 * dx;
  7. float x, y=-1.f;
  8. for (; y<=1.f; y+=dy){
  9. for (x=-1.f; x<=1.f; x+=dx){
  10. printf((x * x + y * y < fabs(sin(l * atan2(x, y))) | (fabs(x) < dx & y > 0)) ? "#" : " ");
  11. }
  12. printf("\n");
  13. }
  14. }
  15.  
  16. int main(int argc, char* argv[])
  17. {
  18. clover(4.f, 48.f);
  19. return 0;
  20. }
Success #stdin #stdout 0s 2248KB
stdin
Standard input is empty
stdout
                                                                                               
                                                                                               
                             ######                         ######                             
                           ###########                   ###########                           
                          ##############               ##############                          
                         ################             ################                         
                         #################           #################                         
                          #################         #################                          
                          ##################       ##################                          
                          ###################     ###################                          
                           ##################     ##################                           
                            ##################   ##################                            
                             #################   #################                             
       ############           ################   ################           ############       
     ###################       ################ ################       ###################     
    ########################    ############### ###############    ########################    
    ###########################   ############# #############   ###########################    
    #############################  ############ ############  #############################    
     ############################### ########## ########## ###############################     
       ############################### ######## ######## ###############################       
          ############################## ###### ###### ##############################          
             ############################# #### #### #############################             
                  ########################## ## ## ##########################                  
                           ###################   ###################                           
                           ################### #####################                           
                  ########################## ##### ##########################                  
             ############################# ######### #############################             
          ############################## ############# ##############################          
       ############################### ################# ###############################       
     ############################### ##################### ###############################     
    #############################  #########################  #############################    
    ###########################   ###########################   ###########################    
    ########################    ###############################    ########################    
     ###################       #################################       ###################     
       ############           ################ ##################           ############       
                             ################# ###################                             
                            ################## ####################                            
                           ##################  ## ##################                           
                          ###################  ## ###################                          
                          ##################   ##  ##################                          
                          #################    ##   #################                          
                         #################     ##    #################                         
                         ################      ##     ################                         
                          ##############       ##      ##############                          
                           ###########         ##        ###########                           
                             ######            ##           ######                             
                                               ##                                              
                                               ##