Turbo Pascal. ????????? ??????? ? ?????????. - PowerPoint PPT Presentation

About This Presentation
Title:

Turbo Pascal. ????????? ??????? ? ?????????.

Description:

Title: Turbo Pascal. . Author: M A X Last modified by: NMR Created Date: 6/3/2006 2:13:20 PM – PowerPoint PPT presentation

Number of Views:100
Avg rating:3.0/5.0
Slides: 9
Provided by: MAX1171
Category:
Tags: pascal | turbo

less

Transcript and Presenter's Notes

Title: Turbo Pascal. ????????? ??????? ? ?????????.


1
Turbo Pascal. ????????? ??????? ? ?????????.
  • ?????? ?.?., ??????? ??????????? ???? ???????
    ??????????????????? ????? ? ??????????? ?????????
    ????????? ????????? ?32
  • ?. ???????????, ??????????? ???????

2
?????? ????????????? ??????????????????
????????.?????????? ????? ? ?????? ?????????? ??
??????.????? ?????? ????? ?????? ? ????????? ??
0 ?? 255. ??? ?????? string. ????????S
stringS1 string12 ? ??????
s ????? 255 ????????, ? ? ?????? s1 -12
????????.??? ?????? ?? ???????? ??????????
????????? ??????? ? ?????????. ??????? ????? ????
?? ??????. ??? ????????? ??????? ????????????
??????????, ??????? ????????????? ?????????, ? ?
????????? ????????????? ??????????, ??????????? ?
????????? ????????? ? ??????????? ??????????
???????????.
3
????????? ???????
? ??????? ??????? ???????
1. Copy (s, p, n) ???????? ?? ?????? s ????????? ?????? n ??????? ? ??????? p, n ? p ????? ????? S???? ???? ???? S1copy(s,6,4) ????? s1???? S1copy(???????,3,3) ????? S1???
2. Concat(s1,s2,,sn) ????????? ????????? ????? S1??? S2????? S3???? S4concat(s1,s3,s2) ????? S4???????????? Sconcat(123,412,3) ????? s1234123
3. Length(s) ?????????? ????? ?????? s. ????????? ????? ????? Sfdx hgv hg-hh_76 Flength(s) ????? f16 ilength('etrewt') ????? i6
4. Pos(s,s1) ???????????? ?????? ????????? ?????? s ? ?????? s1. ??????????? ???????? ????? ?????. S1h S2fghhhdhrthjkh Gpos(s1,s2) ????? g3 S2assfmk Gpos(r,s2) ????? g0
5. Upcase(si) ????????? ???????? ????????? ????? ? ?????????. Ssfdsf s1upcase(si) ????? s1SFDSF S???? s1upcase(si) ????? s1????
4
????????? ?????????
????????? ??????? ???????
1. Insert(s1,s2,p) - ???????? ?????? s1 ? ?????? s2, ??????? ? ??????? p. S1as s2fhg Insert(s1,s2,3) ????? s2fhasg S rtyt Insert(sd,s ,2) ????? srsdtyt
2. Delete(s,p,n) ??????? ?? ?????? s, ??????? ? ??????? p, n ?????????. S?????????? Delete(s,6,5) ????? s????? Sdsads d3q1 Delete(s,d,q) ????? sdsds
3. Val(S,X,C) ??????????? ?????? s ? ????? x ???? ?????????????? ???????, ?? c0, ? ????????? ?????? C ????? ?????? ??????? ? ??????, ??? ????????? ????????? ?????. S1234 Val(S,X,C) ????? x1234 C0 S1234 Val(S,X,C) ????? C3
4. Str(x,s) ??????????? ????? x ? ?????? s. X123 Str(x,s) ????? s123 Str(354,s) ????? s354
5
??????1 ?? ?????? ?????? ??????? ??? ????? ?
???????????? ?????? ?????? ?? ???? ????, ????????
?? ??????????????????.
  • var
  • s,s1string
  • h,ibyte
  • Begin
  • write('??????? ??????')
  • readln(s) s1''
  • for h1 to length(s) do
  • if (shgt'0') and (shlt'9') then
    s1s1sh
  • write(s1)
  • end.

6
??????2 ? ?????? ?????? ????? ??????????
????????? ???? f.
2 ?????? const s1fF var s,s1string
h,ibyte Begin write('??????? ??????')
readln(s) i0 for h1 to length(s) do
if pos(sh,s1)gt0 then inc(i)
write('i',i) end.
  • 1 ??????
  • var
  • s,s1string
  • h,ibyte
  • Begin
  • write('??????? ??????')
  • readln(s) i0
  • for h1 to length(s) do
  • if (sh'f') or (sh'F') then inc(i)
  • write('i',i)
  • end.

7
?????? 6 ???? ??????, ? ??????? ???? ?????.
?????????? ????? ????.
  • Const s10123456789
  • Var sstring
  • i,k,x,cinteger
  • Begin
  • write(??????? ??????)
  • readln(s)
  • k0
  • for i1 to length(s) do
  • if pos (si,s1) gt0 then begin val(si,x,c)
    kkx end
  • writeln( ????? ???? ?????)
  • end.

8
?????? 10 ??????? ?????????, ????????????
???????? ?? ???????? ?????? ???????? ???????
  • const s1'01'
  • var sstring
  • i,kinteger
  • Begin
  • write('??????? ??????') readln(s)
  • k0
  • for i1 to length(s) do
  • if pos(si,s1)gt0 then kk1
  • if klength(s) then writeln('????????? ??????
    ???????? ???????? ??????') else
  • writeln('????????? ?????? ?? ????????
    ???????? ??????')
  • end
Write a Comment
User Comments (0)
About PowerShow.com