Оформить в Паскале: Даны целые числа A, B, x. Вычислить значение функции Y=f(x), если заданы условия, при которых известна формула для вычисления Y.
Приложения:

Ответы
Ответ дал:
0
var
A,B,x:integer;
y:real;
begin
readln(A,B,x);
if x=3
then
y:=(B-sin(B))/A
else
if x=7
then
y:=A*B-B*A/x
else
if x=10
then
y:=x+A
else
if (x mod 3 =0) and (x>6)
then
y:=B-x
else
if (x mod 5 = 0) and (x mod 4 = 0) and (x<65) and (x<>60)
then
y:=x
else
y:=35;
writeln('y(',x,')=',y);
end.
A,B,x:integer;
y:real;
begin
readln(A,B,x);
if x=3
then
y:=(B-sin(B))/A
else
if x=7
then
y:=A*B-B*A/x
else
if x=10
then
y:=x+A
else
if (x mod 3 =0) and (x>6)
then
y:=B-x
else
if (x mod 5 = 0) and (x mod 4 = 0) and (x<65) and (x<>60)
then
y:=x
else
y:=35;
writeln('y(',x,')=',y);
end.
Ответ дал:
0
Program al;
var A,B,x:integer;
y:real;
begin
writeln('A=');
readln(A);
Writeln('B=');
readln(B);
writeln('x=');
readln(x);
if x=3 then
y:=(B-sin(B))/A else
if x=7 then
y:=A*B-B*A/x else
if x=10 then
y:=x+A else
if (x mod 3 =0) and (x>6)
then
y:=B-x else
if (x mod 5 = 0) and (x mod 4 = 0) and (x<65) and (x<>60)
then
y:=x else
y:=35;
writeln('y(',x,') =',y);
readln;
end.
var A,B,x:integer;
y:real;
begin
writeln('A=');
readln(A);
Writeln('B=');
readln(B);
writeln('x=');
readln(x);
if x=3 then
y:=(B-sin(B))/A else
if x=7 then
y:=A*B-B*A/x else
if x=10 then
y:=x+A else
if (x mod 3 =0) and (x>6)
then
y:=B-x else
if (x mod 5 = 0) and (x mod 4 = 0) and (x<65) and (x<>60)
then
y:=x else
y:=35;
writeln('y(',x,') =',y);
readln;
end.
Вас заинтересует
2 года назад
2 года назад
7 лет назад
7 лет назад
9 лет назад
9 лет назад
10 лет назад