using System;
namespace DividersAmount
{
class Program
{
static void Main(string[] args)
{
int n = int.Parse(Console.ReadLine());
int amount = 0;
for (int i = 1; i <= n; i++)
{
if (n % i == 0) amount++;
}
Console.WriteLine(amount);
Console.ReadKey();
}
}
}
Во вложении файл формата Excel 2003. Макрос находится в проекте для листа 1
Добавляет новую область видимости. Пример:
with (Math) {
a = PI * r * r;
x = r * cos(PI);
y = r * sin(PI / 2);
}
Источник -> передатчик -> приёмник
Var a:array[1..5,1..7] of integer;
i,j,kolpol,kolotr:integer;
respol,resotr:real;
begin
for j:=1 to 7 do begin
for i:=1 to 5 do begin
a[i,j]:=random(-50,50);
write(a[i,j]:4);
end;
writeln();
end;
for i:=1 to 5 do begin
respol:=0;
resotr:=0;
kolpol:=0;
kolotr:=0;
for j:=1 to 7 do begin
if a[i,j]>0 then begin
respol+=a[i,j];
kolpol+=1;
end
else if a[i,j]<0 then begin
resotr+=a[i,j];
kolotr+=1;
end;
end;
writeln('Среднее значение положительных чисел в ',i,' столбце=', respol/kolpol);
writeln('Среднее значение отрицательных чисел в ',i,' столбце=', resotr/kolotr);
end;
end.