Quartz | Level 8

## i need greater number in num3

data have;

input num1 num2;

datalines;

1  2

4  3

7  9

11  10

;

run;

output

num1     num2      num3

1              2             2

4              3             4

7              9             9

11            10            11

1 ACCEPTED SOLUTION

Accepted Solutions
Diamond | Level 26

## Re: i need greater number in num3

@aanan1417 wrote:

num3 should have bigger value from num1 or num2

``````data want;
set have;
num3=max(num1,num2);
run;``````
--
Paige Miller
4 REPLIES 4
Diamond | Level 26

## Re: i need greater number in num3

Please explain further what you are doing. What is the logic that takes the input data in data set named HAVE and produces the output?

--
Paige Miller
Quartz | Level 8

## Re: i need greater number in num3

num3 should have bigger value from num1 or num2

Diamond | Level 26

## Re: i need greater number in num3

@aanan1417 wrote:

num3 should have bigger value from num1 or num2

``````data want;
set have;
num3=max(num1,num2);
run;``````
--
Paige Miller