How can I display my output results with commas?
%let one_hummingbird = 3.5; /* grams */
%let elephant_weight = 8800; /* pounds */
%let pound_birds = %sysfunc(floor(%sysevalf((16*28.3495231)/&one_hummingbird.)));
/* average hummingbirds weight is 3 to 4 grams
28.3495231 grams = 1 ounce
16 ounces to 1 pound
so 453.59237 grams = 1 pound
129 hummingbirds to lift 1 pound where the birds weight is 3.5 grams
and the hummingbird can lift it's self plus it's weight again
African elephants weigh between 4,000-7,000 kg (8,800-15,400 lb).
Asian elephants weigh between 3,000-5,000 kg (6,600-11,000 lb).
*/
%let num_birds_needed = %sysfunc(floor(%sysevalf( 453.59237/&one_hummingbird.*&elephant_weight.)));
data have;
sentence = "With an elephant that weights &elephant_weight. pounds
and hummingbirds able to carry an additional &one_hummingbird. grams,
then you need &num_birds_needed. hummingbirds.";
run;
proc print data=have;
run;
Obs
sentence
1
With an elephant that weights 8800 pounds and hummingbirds able to carry an additional 3.5 grams, then you need 1140460 hummingbirds.
... View more