求平方

来源:互联网 发布:java监听数据库表变化 编辑:程序博客网 时间:2024/04/29 14:48

问题:

Write a program that point the squares of  the natural number 0,1,...,n.

解答:

1.

 

 

2.(n-1)2=n2-2n+1则n2=(n-1)2+2n-1

 

 

原创粉丝点击