res.setContentType("text/html");
out.println("<!DOCTYPE HTML><html><head><title>");
out.println(title);
out.println("</title></head><body>");
out.println("<h1>"+title+"</h1>");
out.println("<p>Bernoulli for N="+n+" is:<br>"+bernoulli.asHtml()+"</p>");
out.println("</body></html>");
} else {
res.setContentType("text/plain");
out.println(bernoulli.asString());
}