Program Z2;
Var q,s,n,x,y,m,w,a,b,c:real;
begin
write ('введите число a=');
readln (a);
write ('введите число b=');
readln (b);
write('введите число c=');
readln (c);
x:=c+sqrt(a)*sin(sqrt(c));
y:=sin(3*b)*cos(3*b);
s:= sqrt(a-(x/y));
m := ln(1+sin(a));
w:= sqrt((b+c)/(a*a-1))+(a/(c*b));
n:= sqrt(b+(m/w));
q:=sqrt((3+s)/(8-n));
writeln(q);
end.
Объяснение:
using System;
class Program
{
static int P(string p)
{
int a = 0, dec = 1;
for (int i = p.Length - 1; i >= 0; i--)
{
a += (p[i] - '0') * dec;
dec *= 10;
}
return a;
}
static void Main(string[] args)
{
int minSum = 1000000000, maxSum = 0, itMin = 0, itMax = 0;
for (int i = 0; i < 10; i++)
{
int nowSum = 0;
string a = Console.ReadLine();
string[] now = a.Split(' ');
for (int j = 0; j < now.Length; j++)
{
int n = P(now[j]);
nowSum += n;
}
if (minSum > nowSum)
{
itMin = i;
minSum = nowSum;
}
if (maxSum < nowSum)
{
itMax = i;
maxSum = nowSum;
}
}
Console.WriteLine("{0} - строка с минимумом, {1} - строка с максимумом", itMin + 1, itMax + 1);
Console.ReadLine();
}
}
Program Z2;
Var q,s,n,x,y,m,w,a,b,c: real;
Begin
write ('введите число a=');
readln (a);
write ('введите число b=');
readln (b);
write('введите число c=');
readln (c);
x := c+sqrt(a)*sin(sqrt(c));
y := sin(3*b)*cos(3*b);
s := sqrt(a-x/y);
m := ln(1+sin(a));
w := sqrt((b+c)/(a*a-1))+(a/(c*b));//error x2
n := sqrt(b+(m/w));
q := sqrt((3+s)/(8-n));//error x4
writeln(q);
End.
Объяснение:
комментарии - кол-во ошибок(делал для себя) , крч говоря 2 лишних корня и пара скоьок в действии q, и ... вроде бы лишние скобки в w , но тут уже можно будет зрительно сравнивать