Console.WriteLine("请输入需要计算的数");
int a = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("请输入项数");
int n = Convert.ToInt32(Console.ReadLine());
double k=0, m = 0;
for (int i = 1; i <= n; i++)
{
k += a*(double)Math.Pow(10, i - 1);
m += k;
}
Console.WriteLine(m);
Console.ReadLine();