|
more than 340 programs for free
|
![]() English |
![]() Slovensky |
![]() Česky |
![]() Šarišsky |
|
Category: Homework in Pascal Author: Michal6 Program: Ascii_tabulka.pas File exe: Ascii_tabulka.exe need: Subor.txt Zobrazi ASCII tabulku zo suboru subor.txt. Nasledne vypise v ASCII tvare.
Views: 1134x
{ ASCII_TABULKA.PAS Copyright (c) Michal } { Zobrazi ASCII tabulku zo suboru subor.txt. } { Nasledne vypise v ASCII tvare. } { } { Datum:28.11.2007 http://www.trsek.com } program ascipocitadlo; uses crt; type pole=array[1..256] of integer; var z:char; i,pom:integer; t:text; tab:pole; begin assign(t,'C:\subor.txt'); reset(t); while not eof(t) do begin read(t,z); pom:=ord(z); tab[pom]:=tab[pom]+1; end; clrscr; writeln('Stlacte ENTER pre zobrazenie tabulky'); readln; for i:=48 to 124 do {zobrazi hlavne cislice a pismena} begin write(chr(i),'-',ord(tab[i]),' '); end; writeln; writeln('Lubovolnou klavesou opustite program'); readkey; end. [Run] [Save] [Print] [Send e-mail] |
|