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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!

Register now

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