.


:




:

































 

 

 

 


,




Repeat <> until <>;

:

Repeat , (False), , (True), . . Repeat . Repeat , <> . .

:

S:=0;

I: =1;

Repeat

S:=S+1/I;

I:=I+1

Until (1/K<Eps) Or (I>=MaxInt);

1.

1. .

2. .

4. , .

program lab1;

begin

writeln('<>');

end.

5. writeln('< >'). , , .

6. F10, Run, Run. Alt-F5.

7. task _1.pas, F10, Save as.

8. TP, .

 

2.

 

1. .

2. , File, New.

3. :

Program kwur; (* *)

Uses crt; { CRT}

Var a,b,c,d,w,z,xl,x2:Real; { }

otvet:Char;

Begin { }

Clrscr; { }

WriteLn (' ');

WriteLn (' ');

Repeat { }

Write(' a');

ReadLn (); { }

If a=0 Then Writeln (' ')

Else Begin

Write (' b='); ReadLn (b);

Write (' ='); ReadLn ();

D: = b*b - 4*a*c; { }

Z:=-b/(2*a);

W:=sqrt(abs(d))/(2*a);

WriteLn (' a=',a:5:2,' b=',b:5:2, ' c=',c:5:2);

If D<0 then

Begin

WriteLn ('Xl= ', Z:6:3,' + i*',w:5:3);

WriteLn ('X2= ', Z:6:3,' - i*',w:5:3);

End

Else

Begin

xl: = z + w;

x2: = z-w;

WriteLn ('xl=',xl:5:2,' x2=',x2:5:2);

End

End;

WriteLn (' ? (y/n)');

Readln (otvet);

Until otvet<>'y'; {, otvet }

WriteLn ('! !');

End.

4. , i, F10, Debug, Add Watch.

20. .

21. , F8. d.

3. .

0,001 a=5,48 b=1,27:

:

 

 

: 0,022.

 

: Turbo Pascal 0,01 a=3,81 b=7,16:

 

 

: -0,04.

4. - y = y(x).

x<0

Program part_1;

Uses crt;

Var x,y: real;

Begin

Clrscr; { }

Writeln( x );

Readln(x); { x}

If x<0 then writeln( ) { }

else begin y:=sqrt(x)/(x+2); { }

writeln(y:5:2) { }

end;

readkey; { }

end.

 

: -

5. 0 9. (0 , 1 , 2 ,...).

6. , , N=3.

 

 

7. , :

1. ?

2. real? real integer?

3. , , ? .

4. ?

5. read readln? ?

6. write writeln? ?

7. ?

8. ?

9. ?





:


: 2016-09-03; !; : 454 |


:

:

, .
==> ...

1747 - | 1533 -


© 2015-2024 lektsii.org - -

: 0.009 .