要求
编写一个递归函数,求满足以下条件的最大n值: |
---|
1²+2²+3²+……+n²<1000 |
#include <stdio.h>
fun (int n)
{
int sum=0;
for (int i=1;i<=n
要求
编写一个递归函数,求满足以下条件的最大n值: |
---|
1²+2²+3²+……+n²<1000 |
#include <stdio.h>
fun (int n)
{
int sum=0;
for (int i=1;i<=n