我叫王超然,是一名电脑爱好者,现在在新加坡留学上高一.我立志成为一名电脑人才,愿意在这里与大家一同分享我玩转电脑的心得.O-level华文考了A-One哈哈!
天气: 晴朗
心情: 高兴
/*P4Q8
* Name:Wang Chaoran
* Description:Summing a series) Write a program to sum the following series:
*/
public class P4Q8
{
public static void main(String[] args)
{
double sum = 0;
//Computer the sum
for(double i=1;i<=97;i+=2)
{
sum += i/(i+2);
}
//Display the sum
System.out.println("Sum of the following series: "+sum);
}
}
导入论坛查看(54)回复(0)引用(0)好评(0) 差评(0)
加入收藏
编辑
审核
TAG:
computing