fork download
  1. mean <- 85
  2. sd <- 15
  3. cutoff <- 120
  4. pop <- 1e+6
  5.  
  6. p <- 1-pnorm(cutoff, mean, sd)
  7. s <- sprintf("%.2f%% of the population are above %d, making for a total of %d.",
  8. round(p*100,2), cutoff, as.integer(pop*p))
  9. print(s)
Success #stdin #stdout 0.24s 39692KB
stdin
Standard input is empty
stdout
[1] "0.98% of the population are above 120, making for a total of 9815."