public class Jiecheng { public static void main(String[] args) { double C = 1.0; double M = 0; for (double B = 1.0; B <= 4; B++) { C = C * B; M = M + 1 / C; } System.out.println("S=" + M); } }