BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
sdkhli
SAS Employee

Top down:

data _null_;
j=24;
do i=0 to 24 by 2;
b=repeat('*',i);
c=floor((j-i)/2);
put +c b;
end;
run;

            *
           ***
          *****
         *******
        *********
       ***********
      *************
     ***************
    *****************
   *******************
  *********************
 ***********************
*************************

Bottom up:

data _null_;
j=24;
do i=24 to 0 by -2;
b=repeat('*',i);
c=floor((j-i)/2);
put +c b;
end;
run;

*************************
 ***********************
  *********************
   *******************
    *****************
     ***************
      *************
       ***********
        *********
         *******
          *****
           ***
            *
1 ACCEPTED SOLUTION

Accepted Solutions
1 REPLY 1
Rick_SAS
SAS Super FREQ

And don't forget this version of a SAS Christmas tree, drawn by the DATA step:

https://blogs.sas.com/content/iml/2011/12/16/a-sas-christmas-tree.html

 

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

Discussion stats
  • 1 reply
  • 504 views
  • 7 likes
  • 2 in conversation