摘要:
计算8+88+888+…前10项之和 编写应用程序,使用for循环语句计算8+88+888+…前10项之和。 public class Demo09 { public static void main(String[] args) { // your code long x=0,sum=0; for 阅读全文
摘要:
输出满足1+2+3+…+n<8888的最大整数 编写应用程序,输出满足1+2+3+…+n<8888的最大整数 输出格式:满足条件的最大整数:xxxxx public class Demo09 { public static void main(String[] args) { // your cod 阅读全文
摘要:
计算1+1/2!+1/3!+1/4!+…的前20项和 分别用for循环和do-while循环计算1+1/2!+1/3!+1/4!+…的前20项和。 输出格式如下: 使用do-while循环计算的sum=xxxxxxxxx 使用for循环计算的sum=xxxxxxxxxxx public class 阅读全文