ПЕРВАЯ ПРОГРАММА using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks;
namespace Factorial { class Program {
static void Main(string[] args) { string str = ""; Console.WriteLine("Vvestu n:"); str = Console.ReadLine(); int n = Convert.ToInt32(str); Console.WriteLine(Enumerable.Range(1, n).Aggregate((p, x) => p * x)); Console.ReadKey(); } } }
Вторая программа (поменяй путь на свой!) using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Text; using System.Threading.Tasks;
namespace Open { class Program { static void Main(string[] args) { System.Diagnostics.Process.Start(@"T:\Program Files\Projects\Lessons\Factorial\Factorial\bin\Debug\Factorial.exe"); } } }
правильные 1, 2, 3, 5, 7, 8