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: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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