BookmarkSubscribeRSS Feed
praveenkotte
Fluorite | Level 6

 i want create  mathematical tabels from 1 to 10 ?

the ouput should be like this

 

one_table   two_table   three_table  ---------- ten_table

1                  2                   3                                10

2                  4                    6                                20

3                  6                   9                                 30

4                   8                  12                               40

5                   10                15                                50

6                  12                 18                               60

7                  14                 21                               70

8                  16                 24                             80

9                   18                27                              90

10                 20                 30                             100

1 REPLY 1
gamotte
Rhodochrosite | Level 12
data want;
format one two three four five six seven eight nine ten 3.;
array m {*} _ALL_;
do i=1 to 10;
	do j=1 to 10;
            m(j)=i*j;
	end;
	output;
end;

drop i j;
run;

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 631 views
  • 0 likes
  • 2 in conversation