using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
Test("张三", 99,98,77);
Console.ReadKey();
}
public static void Test(string name, params int[] score)
{
int sum = 0;
for (int i = 0; i < score.Length; i++)
{
sum += score[i];
}
Console.WriteLine("{0}这次考试的总成绩是{1}", name, sum);
}
}
}