(5)编写一个控制台应用程序,要求用户输入4个int值,并显示它们的乘积。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Chapter3_5
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("请输入4个int值:");
int a, b, c, d;
a = Convert.ToInt32(Console.ReadLine());
b = Convert.ToInt32(Console.ReadLine());
c = Convert.ToInt32(Console.ReadLine());
d = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("{0}×{1}×{2}×{3} = {4}", a, b, c, d, a * b * c * d);
Console.ReadKey();
}
}
}