fork(1) download
  1. #include <math.h>
  2. #include <stdio.h>
  3.  
  4. void clover(float l, float r)
  5. {
  6. float d = 2.f / --r;
  7. float x, y=-1.f;
  8. for (; y<=1.f; y+=d){
  9. for (x=-1.f; x<=1.f; x+=d){
  10. printf((x * x + y * y < fabs(sin(l * atan2(x, y))) | (fabs(x) < d & 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 2292KB
stdin
Standard input is empty
stdout
                                                
                                                
               ###            ###               
              #####          #####              
             #######        #######             
             ########      ########             
             ########      ########             
             #########    #########             
             #########    #########             
             ##########  ##########             
              #########  #########              
              #########  #########              
               ########  ########               
    ######     ########  ########     ######    
   #########    ################    #########   
  ############  ################  ############  
  ############## ############## ##############  
  ############### ############ ###############  
   ############### ########## ###############   
    ############### ######## ###############    
     ############### ###### ###############     
       ############## #### ##############       
         ############# ## #############         
              #########  #########              
              ####################              
         ############# ## #############         
       ############## #### ##############       
     ############### ###### ###############     
    ############### ######## ###############    
   ############### ########## ###############   
  ############### ############ ###############  
  ############## ############## ##############  
  ############  ################  ############  
   #########    ################    #########   
    ######     ##################     ######    
               ##################               
              ####################              
              ####################              
             ######################             
             ######### ## #########             
             ######### ## #########             
             ########  ##  ########             
             ########  ##  ########             
             #######   ##   #######             
              #####    ##    #####              
               ###     ##     ###               
                       ##                       
                       ##