对C#初学者起练习作用 有些不完善 帮助修改:
using System;
using System.Collections.Generic;
using System.Text;
namespace jiecheng
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("欢迎使用简单阶乘求和!");
Console.WriteLine("-------------------------------------------------------------------");
string str = "Y";
while (str == "Y")
{
Console.WriteLine("请输入操作阶乘个数:");
int num = int.Parse(Console.ReadLine());
int[] data = new int[num];
for (int i = 0; i < data.Length; i++)
{
Console.WriteLine("请输入{0}第个阶乘数:", i + 1);
data[i] = i