what is prime numbers? how we can get plc write sas code?

Answer Posted / bala

***how we can get plc write sas code? ;
data prime;
input numbers @@;
datalines;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
21 22 23 24 25 26 27 28 29
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
47 48 49 50 51 52 53 54 55 56 57 58
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
76 77 78 79 80
;
run;


data p1(drop= p numbers);
set prime;
P=numbers;
if mod(P,1)= 0 and mod(P,P) = 0 and mod(P,2) ^= 0
and mod(P,3) ^= 0 and mod(P,5)^=0 and mod(P,7)^=0 then
Prime_numbers=P;
if P=3 or P=2 or P=5 or P=7 then Prime_numbers=P;
if not missing(prime_numbers);
put prime_numbers;
run;

Is This Answer Correct ?    9 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is substr function?

725


sas implementing companies in pune implementing clinical projects if anyone knows plz send ans immediately

3211


For a user to have access to a standard workspace server, is internal authentication alone is sufficient? : sas-grid-administration

617


If you could design your ideal job, what would it look like?

2479


what is the difference between nodup and nodupkey options? : Sas programming

735






how are numeric and character missing values represented internally? : Sas programming

725


describe how to adjust the performance of data integrator? : Sas-di

649


Define run-group processing?

677


What do you know about sas data set?

687


what is data integration? : Sas-di

728


Describe a time when you were really stuck on a problem and how you solved it?

2186


Hi,by usining ptf how we have to combine (likr merge)10 datasets at a time in the oracle database(and write a macro code also)?Like this i have a douts a lot if you dont mind may please send one text mail for me(madhusudhanap16@gmail.com)?

1329


how do you want missing values handled? : Sas programming

619


Where do you use proc means over proc freq?

655


Will it bother you if the guy at the next desk times the frequency and duration of your bathroom or coffee breaks on the grounds that ?you are getting paid twice as much as he is??

2206