if x=round(26.3,10)-1 then x= how much and how explain?
Answers were Sorted based on User's Feedback
Answer / ramprakash
ROUND FUNCTION
rounds the first argument to the nearest multiple of the
second argument, or to
the nearest integer when the second argument is omitted.
So the answer for x will be 29...
| Is This Answer Correct ? | 16 Yes | 1 No |
Answer / radhiv kumar sure
X=ROUND(26.3,10)-1;
AFTER ROUNDING THE VALUE
X=30-1;
X=29;
| Is This Answer Correct ? | 11 Yes | 1 No |
Answer / samba
Hello Its Me.. u r wrong. the answer is 29.
The ROUND function rounds the first argument to a value that is very close to a multiple of the second argument. The result might not be an exact multiple of the second argument.
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / its me
The answer is 25 and not 29.
Can any one challenge on this?
It first rounds of the first argument to the nearest value.
The nearest value is 26 and then deducts 1 from that to be
25.
| Is This Answer Correct ? | 4 Yes | 12 No |
what is _error_?
2 Answers Axis Bank, Cognizant, JPMorgan Chase,
If you have a data set that contains 100 variables, but you need only five of those, what is the code to force SAS to use only those variable?
/* This is example of age caluculate wihtout to display perfect days and years in output window */ data age; retain dob "12jun2003"d now "24may2011"d; age1=now-dob; age=(now-dob)/365.25; years=int(age); days1=round((age-years)*365.25); months=month(now)-1; if days1 gt 30 and months in(12,10,8,6,4,2)then do; month1=days1/30.4375; month=int(days1/30.4375); if day(now)=1 then days=1; else days=round((month1-month)*30.4375)+1; drop days1 month1 month; end; else if days1 gt 30 and months in (1,3,5,7,9,11)then do; month1=days1/30.4375; month=int(days1/30.4375); if day(now)=1 then days=1; else days=round((month1-month) *30.4375); drop days1 month1 month; end; drop age age1; proc print data=age; format dob now date.; run;
How to create list output for cross-tabulations in proc freq?
What are _numeric_ and _character_ and what do they do?
How we can call macros with in data step? : sas-macro
What is the maximum length of the macro variable? : sas-macro
for what purpose would you use the retain statement? : Sas programming
What are the implications?
How would you invoke a macro? : sas-macro
How would you code a macro statement to produce information on the sas log? This statement can be coded anywhere? : sas-macro
what has been your most common programming mistake? : Sas programming