i是虚数,i平方等于-1,所以答案为1
以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;
}
}
无穷大
以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;
}
}