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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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