class Program
{
public static void Main()
{
double[,, ] stats = new double[3, 2, 10];
string[] players = new string[3];
int x, y, z;
players[0] = "Tom Brady";
players[1] = "Drew Brees";
players[2] = "Peyton Manning";
for (x = 0; x < 3; ++x)
{
Console.WriteLine("Enter stats for {0}", players[x]);
for (y = 0; y < 2; ++y)
{
Console.WriteLine("Game {0}", y + 1);
stats[x, y, z] = ***inputstats(stats[x, y, z])***;
}
}
}
public static double[] inputstats(double[] methodstats)
{
methodstats = new double[10];
Console.WriteLine("Enter pass attempts: ");
methodstats[0] = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("Enter completions: ");
methodstats[1] = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("Enter completion percentage: ");
methodstats[2] = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("Enter total yards: ");
methodstats[3] = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("Enter touchdowns: ");
methodstats[4] = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("Enter interceptions: ");
methodstats[5] = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("Enter rushing yards: ");
methodstats[6] = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("Enter rushing touchdowns: ");
methodstats[7] = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("Enter fumbles: ");
methodstats[8] = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("Enter QB rating: ");
methodstats[9] = Convert.ToDouble(Console.ReadLine());
return methodstats;
}
}
Here is my code I have so far. Keep in mind that I am VERY beginner. I am trying to create a console that will ask for user input for 3 different players over 2 games. Once I get all the data input by the user, I will go on to add the ability for the user to be prompted to display either the game 1 statline, game 2 statline, or the average of the two games. Right now I'm stuck on just getting the input. I am getting an error where I have bold and italics on the line that the best overload method match has some invalid arguments. What am I messing up here? I'm pretty sure it is in z, but I'm not quite sure how to input it into the third dimension of the array for the 10 stats. Halp!