Advertisement
Guest User

Untitled

a guest
Nov 1st, 2014
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.56 KB | None | 0 0
  1. program zhatie;
  2. var f: text;
  3. const n=1000;
  4. var i1,s1,u1,t1,r1,w1,q1,h1,k2,d2,c2,v2,p2,l2,k,o2,x2,z2,y2,j2,g2,s2,u2,t2,r2,w2,q2,h2,k3,d3,c3,v3,p3,y33,y34,y35,y36,y37,y38,y39,y40,y41,y42,y43,y44,y45,y46,y47,y48,y49,y50,y51,y52,y53,y54,y55,y56,y57,y58,y59,y60,y61,y62,y63,y64,h8,prosent1,y65,y66,y67,y68,y69,y70,y71,y72,y73,y74,y75,y76,y77,y78,y79,y80,y81,y82,y83,y84,y85,y86,y87,y88,y89,y90,y91,y92,y93,y94,y95,y96: integer;
  5. var a: array [1..n] of char;
  6. var prosent,posle,pered: real;
  7. begin
  8. assign(f,'C:\Users\Аня\Downloads\Text\Текст.txt');
  9. reset(f);
  10. while not Eof(f) do begin
  11. read(f,a[n]);
  12. write(a[n]);
  13. end;
  14. reset(f);
  15. while not Eof(f) do begin
  16. read(f,a[n]);
  17. if (ord(a[n])=224) then s1:=s1+1;
  18. if (ord(a[n])=225) then u1:=u1+1;
  19. if (ord(a[n])=226) then t1:=t1+1;
  20. if (ord(a[n])=227) then r1:=r1+1;
  21. if (ord(a[n])=228) then w1:=w1+1;
  22. if (ord(a[n])=229) then q1:=q1+1;
  23. if (ord(a[n])=230) then h1:=h1+1;
  24. if (ord(a[n])=231) then k2:=k2+1;
  25. if (ord(a[n])=232) then d2:=d2+1;
  26. if (ord(a[n])=233) then c2:=c2+1;
  27. if (ord(a[n])=234) then v2:=v2+1;
  28. if (ord(a[n])=235) then p2:=p2+1;
  29. if (ord(a[n])=236) then l2:=l2+1;
  30. if (ord(a[n])=237) then k:=k+1;
  31. if (ord(a[n])=238) then o2:=o2+1;
  32. if (ord(a[n])=239) then x2:=x2+1;
  33. if (ord(a[n])=240) then z2:=z2+1;
  34. if (ord(a[n])=241) then y2:=y2+1;
  35. if (ord(a[n])=242) then j2:=j2+1;
  36. if (ord(a[n])=243) then g2:=g2+1;
  37. if (ord(a[n])=244) then s2:=s2+1;
  38. if (ord(a[n])=245) then u2:=u2+1;
  39. if (ord(a[n])=246) then t2:=t2+1;
  40. if (ord(a[n])=247) then r2:=r2+1;
  41. if (ord(a[n])=248) then w2:=w2+1;
  42. if (ord(a[n])=249) then q2:=q2+1;
  43. if (ord(a[n])=250) then h2:=h2+1;
  44. if (ord(a[n])=251) then k3:=k3+1;
  45. if (ord(a[n])=252) then d3:=d3+1;
  46. if (ord(a[n])=253) then c3:=c3+1;
  47. if (ord(a[n])=254) then v3:=v3+1;
  48. if (ord(a[n])=255) then p3:=p3+1;
  49. end;
  50. i1:=s1+u1+t1+r1+w1+q1+h1+k2+d2+c2+v2+p2+l2+k+o2+x2+z2+y2+j2+g2+s2+u2+t2+r2+w2+q2+h2+k3+d3+c3+v3+p3;
  51. pered:= (i1*8);
  52. reset(f);
  53. while not Eof(f) do begin
  54. read(f,a[n]);
  55. if (ord(a[n])=224) then y33:=4; if (ord(a[n])=224) then y65:=y65+1; if (ord(a[n])=224) then y33:=y33*y65;
  56. if (ord(a[n])=225) then y34:=7; if (ord(a[n])=225) then y66:=y66+1; if (ord(a[n])=225) then y34:=y34*y66;
  57. if (ord(a[n])=226) then y35:=6; if (ord(a[n])=226) then y67:=y67+1; if (ord(a[n])=226) then y35:=y35*y67;
  58. if (ord(a[n])=227) then y36:=7; if (ord(a[n])=227) then y68:=y68+1; if (ord(a[n])=227) then y36:=y36*y68;
  59. if (ord(a[n])=228) then y37:=6; if (ord(a[n])=228) then y69:=y69+1; if (ord(a[n])=228) then y37:=y37*y69;
  60. if (ord(a[n])=229) then y38:=4; if (ord(a[n])=229) then y70:=y70+1; if (ord(a[n])=229) then y38:=y38*y70;
  61. if (ord(a[n])=230) then y39:=7; if (ord(a[n])=230) then y71:=y71+1; if (ord(a[n])=230) then y39:=y39*y71;
  62. if (ord(a[n])=231) then y40:=7; if (ord(a[n])=231) then y72:=y72+1; if (ord(a[n])=231) then y40:=y40*y72;
  63. if (ord(a[n])=232) then y41:=6; if (ord(a[n])=232) then y73:=y73+1; if (ord(a[n])=232) then y41:=y41*y73;
  64. if (ord(a[n])=233) then y42:=7; if (ord(a[n])=233) then y74:=y74+1; if (ord(a[n])=233) then y42:=y42*y74;
  65. if (ord(a[n])=234) then y43:=6; if (ord(a[n])=234) then y75:=y75+1; if (ord(a[n])=234) then y43:=y43*y75;
  66. if (ord(a[n])=235) then y44:=6; if (ord(a[n])=235) then y76:=y76+1; if (ord(a[n])=235) then y44:=y44*y76;
  67. if (ord(a[n])=236) then y45:=6; if (ord(a[n])=236) then y77:=y77+1; if (ord(a[n])=236) then y45:=y45*y77;
  68. if (ord(a[n])=237) then y46:=5; if (ord(a[n])=237) then y78:=y78+1; if (ord(a[n])=237) then y46:=y46*y78;
  69. if (ord(a[n])=238) then y47:=3; if (ord(a[n])=238) then y79:=y79+1; if (ord(a[n])=238) then y47:=y47*y79;
  70. if (ord(a[n])=239) then y48:=7; if (ord(a[n])=239) then y80:=y80+1; if (ord(a[n])=239) then y48:=y48*y80;
  71. if (ord(a[n])=240) then y49:=6; if (ord(a[n])=240) then y81:=y81+1; if (ord(a[n])=240) then y49:=y49*y81;
  72. if (ord(a[n])=241) then y50:=5; if (ord(a[n])=241) then y82:=y82+1; if (ord(a[n])=241) then y50:=y50*y82;
  73. if (ord(a[n])=242) then y51:=5; if (ord(a[n])=242) then y83:=y83+1; if (ord(a[n])=242) then y51:=y51*y83;
  74. if (ord(a[n])=243) then y52:=7; if (ord(a[n])=243) then y84:=y84+1; if (ord(a[n])=243) then y52:=y52*y84;
  75. if (ord(a[n])=244) then y53:=8; if (ord(a[n])=244) then y85:=y85+1; if (ord(a[n])=244) then y53:=y53*y85;
  76. if (ord(a[n])=245) then y54:=8; if (ord(a[n])=245) then y86:=y86+1; if (ord(a[n])=245) then y54:=y54*y86;
  77. if (ord(a[n])=246) then y55:=8; if (ord(a[n])=246) then y87:=y87+1; if (ord(a[n])=246) then y55:=y55*y87;
  78. if (ord(a[n])=247) then y56:=7; if (ord(a[n])=247) then y88:=y88+1; if (ord(a[n])=247) then y56:=y56*y88;
  79. if (ord(a[n])=248) then y57:=8; if (ord(a[n])=248) then y89:=y89+1; if (ord(a[n])=248) then y57:=y57*y89;
  80. if (ord(a[n])=249) then y58:=8; if (ord(a[n])=249) then y90:=y90+1; if (ord(a[n])=249) then y58:=y58*y90;
  81. if (ord(a[n])=250) then y59:=7; if (ord(a[n])=250) then y91:=y91+1; if (ord(a[n])=250) then y59:=y59*y91;
  82. if (ord(a[n])=251) then y60:=7; if (ord(a[n])=251) then y92:=y92+1; if (ord(a[n])=251) then y60:=y60*y92;
  83. if (ord(a[n])=252) then y61:=7; if (ord(a[n])=252) then y93:=y93+1; if (ord(a[n])=252) then y61:=y61*y93;
  84. if (ord(a[n])=253) then y62:=8; if (ord(a[n])=253) then y94:=y94+1; if (ord(a[n])=253) then y62:=y62*y94;
  85. if (ord(a[n])=254) then y63:=8; if (ord(a[n])=254) then y95:=y95+1; if (ord(a[n])=254) then y63:=y63*y95;
  86. if (ord(a[n])=255) then y64:=7; if (ord(a[n])=255) then y96:=y96+1; if (ord(a[n])=255) then y64:=y64*y96;
  87. end;
  88. h8:= y33+y34+y35+y36+y37+y38+y39+y40+y41+y42+y43+y44+y45+y46+y47+y48+y49+y50+y51+y52+y53+y54+y55+y56+y57+y58+y59+y60+y61+y62+y63+y64;
  89. posle:=h8;
  90. prosent:= ((pered-posle)/pered)*100;
  91. writeln;
  92. prosent1:=floor(prosent);
  93. write(prosent1,'%');
  94. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement