求和题:对(2的(i乘以i)次方)求和,i从1到n

2025-04-05 21:04:29
推荐回答(4个)
回答1:

i是虚数,i平方等于-1,所以答案为1

回答2:

以C为例:

#include "stdio.h"
#include "math.h"
main()
{
unsigned int i,j,n=5; /*以n=5为例 */
double sum=0,sum1;
for (i=2;i<=n;i++)
{
sum1=2;
for (j=2;j<=i*i;j++)
{
sum1=*2;
}
sum=sum+sum1;
}

}

回答3:

无穷大

回答4:

以C为例:
#include
"stdio.h"
#include
"math.h"
main()
{
unsigned
int
i,j,n=5;
/*以n=5为例
*/
double
sum=0,sum1;
for
(i=2;i<=n;i++)
{
sum1=2;
for
(j=2;j<=i*i;j++)
{
sum1=*2;
}
sum=sum+sum1;
}
}