Var m:array[1..10] of integer;
a,i,k:integer;
begin
k:=0;
for i:=1 to 10 do
read(m[i]);
readln(a);
for i:=1 to 10 do
if m[i]=a then k+=1;
writeln(k);
<span>end.</span>
Function circle_func(x: real): real;
begin
circle_func := sqrt(4 - sqr(x + 8)) - 2;
end;
function line_func(x: real): real;
begin
line_func := 0.5*x + 1;
end;
function quadratic_func(x: real): real;
begin
quadratic_func := sqr(x - 6);
end;
var
x, y: real;
begin
writeln('Введите аргумент: ');
readln(x);
if ((x >= -10) and (x < -6)) then y := circle_func(x);
if ((x >= -6) and (x < 2)) then y := line_func(x);
if ((x >= 2) and (x < 6)) then y := 0;
if ((x >= 6)) then y := quadratic_func(x);
writeln(y:5:3);
end.
using System;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
int first = int.Parse(Console.ReadLine());
int second = int.Parse(Console.ReadLine());
if (first == second)
first = second = 0;
else if (first > second)
second = first;
else first = second;
Console.WriteLine("{0} {1}",first,second);
}
}
}
Ответ:
Sub F(x)
If x > 0 Then y = Exp(x)
Else
If x < 0 Then y = Tan(x)
End If
End Sub
Объяснение:
Простейшие встроенные функции для
и tg x.