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

Explain the use of proc print and proc contents?

558


What are the ways in which macro variables can be created in sas programming?

569


How will you react when, while consulting a SAS documentation manual to get an answer to a problem, someone says hey, I thought you were supposed to know all that stuff already, and not have to look it up in a book?

1944


How would you include common or reuse to be processed along with your statements?

1899


What are the advantages of using sas?

605






what is sas olap server? : Sas-di

689


Give an example where SAS fails to convert character value to numeric value automatically?

608


In sas, what are the areas that you are most interested in? : sas-grid-administration

636


for report generation which one you used proc report or data_null_?

6586


Hi, If anyone has base SAS certification dumps, please share.

1386


Do we follow ADAM in analysis dataset development?How? Usually which version? Why is it necessary?

1912


Intern stastical programmer written test

288


Which statement does not perform automatic conversions in comparisons?

1202


What is the use of PROC gplot?

638


What are the ways to do a “table lookup” in sas?

593