ПЕРВАЯ ПРОГРАММА 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. Межстраничный соединитель
1. a:=5
2. {*текст*}
3. условие
В практике не совсем понял, что требуется, так что просто написал программу
program m1;
var F,b,a,c:integer;
begin
read(a,b);
F:=b*b - a*a;
if F<0 then
c:=b
else
c:=a;
writeln(c);
end.