对照了答案,答案也是这样写的,不同之处是abcd四个变量的名称。
请问哪里出错了?
static void Main(string[] args)
{
int a, b, c, d;
Console.WriteLine("Enter first number:");
a = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter second number:");
b = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter third number:");
c = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter fourth number:");
d = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("The product of {0] and {1} and {2} and {3] is {4}.",
a,b,c,d, a * b * c * d);
}