Program Lab1;
{
}
Var
x,a,b,p,y,z:Single;
Begin
Write(x=);
ReadLn(x);
Write(a=);
Readln(a);
Write(b=);
Readln(b);
y:=(4*Sqr(Sin(x))+3)/2;
p:=Sqr(Sin(a*(3*Sqr(y)-1/3)));
z:=(p+11.75)/(p+b);
Writeln(y=,y:8:4,z=,z:8:4);
End.
Var
x,a,b,p,y,z:Single;
Begin
AssignFile(input,in.txt);
Reset(input);
AssignFile(output,out.txt);
Rewrite(output);
Read(x,a,b);
y:=(4*Sqr(Sin(x))+3)/2;
p:=Sqr(Sin(a*(3*Sqr(y)-1/3)));
z:=(p+11.75)/(p+b);
Writeln(y=,y:8:4);
Writeln(z=,z:8:4);
CloseFile(input);
CloseFile(output)
End.
.
, , , , , , .
1. .
2. Pascal.
3. , Pascal.
4. .
5. .
6. , 30: z:= (p + 11.75) / (p + b);
7. Unknown identifier?
.
, .
, .
y = f(x). ,
y = f(x) | ||
, . . if then else, if then( if).
|
|
30.
1. if then else
. y = f (x) .
{ x y }
if x>3 then
y:=27*Sqr(x-3)*(x-3)
else if x>1 then
y:=Sqr(x)*x
else if x> 0 then
y:=x
Else
y:=Sqr(Sin(x))/2;
{ y}
, if then else :
- if then else else ; if then ;
- ( );
- else if, .
:
- ( ),
- , ; if then else , then .
, 30 x = 3, x = 0( x = 1). x = 3. : x > 3 x <= 3. if then else x > 3. then y = 27 + (x -3)3.
if . (x = 3, x = 1 x = 0).
2. if
. . , true , x false .
y = f (x) .
{ x y }
if x > 3 then
y:=27*Sqr(x-3)*(x-3);
if (x <= 3) And (x>1) then
y:= Sqr(x) * x;
if (x<=1) And (x>0) then
y:=x;
if x>=0 then
y:=Sqr(Sin(x))/2;
{ y}
, , . if . .
. . , if . if. .
|
|
, .
. , . , , . , .
( 30)
.
x .
.
.
. , 30.
() y = f (x) : x = 5, , x = 2, x = 0,8 x = -3.1415.
y = f (x) .
x | y | y |
31,00 | ||
8,000 | ||
0.8 | 0,800 | |
-3,1415 | 0,500 | |
- |