using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
int B,n,i,x;
float A, C;
C = 0;
A = 1;
B = 1;
n = 0;
x = 1;
while (A / B > 0.00001)
{
C = C + A / B;
n = n + 1;
for (i = 0,A=1; i < n; i++)
A = A * x;
for (i = 1,B=1; i <= n; i++)
B = B * i;
}
Console.WriteLine(C);
Console.Read();
}
}
}
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
int B,n,i,x;
float A, C;
C = 0;
A = 1;
B = 1;
n = 0;
x = 1;
while (A / B > 0.00001)
{
C = C + A / B;
n = n + 1;
for (i = 0,A=1; i < n; i++)
A = A * x;
for (i = 1,B=1; i <= n; i++)
B = B * i;
}
Console.WriteLine(C);
Console.Read();
}
}
}
全站熱搜
留言列表