Hirdetés
- Megjött a jubileumi Pixel széria
- Fotók, videók mobillal
- Telekom mobilszolgáltatások
- Xiaomi 13 - felnőni nehéz
- Samsung Galaxy A54 - türelemjáték
- Google Pixel topik
- Samsung Galaxy S25 - végre van kicsi!
- Android szakmai topik
- Honor 400 Pro - Gép a képben
- Samsung Galaxy S25 Ultra - titán keret, acélos teljesítmény
Új hozzászólás Aktív témák
-
N!tRo
tag
válasz
CocooN-z #1748 üzenetére
Biztos, hogy nem tökéletes számodra, de át tudod gondolom alakítani olyanra, amilyenre szeretnéd.
Ha valamit nem értesz, kérdezel, de ne legyél writeonly, jöjj rá magad.
program feladat;
uses crt;
var menu,enter:char;
index1,index2,pagecount,currentpage,namecount: integer;
name_per_page,search_number,matches:integer;
inputfile: text;
names: array[0..199] of string;
borndate: array[0..199] of integer;
pay: array[0..199] of longint;
newname,search_string:string;
procedure generate_datas;
begin
randomize;
for index1:=0 to namecount do borndate[index1]:=random(60)+1930;
for index1:=0 to namecount do pay[index1]:=(random(65000)*5)+50000;
end;
procedure read_names;
begin
assign(inputfile,'nevek.txt');
reset(inputfile);
namecount:=0;
repeat
readln(inputfile,names[namecount]);
inc(namecount);
until eof(inputfile);
close(inputfile);
generate_datas;
end;
procedure list_names;
begin
name_per_page:=10;
for index1:=0 to (namecount div name_per_page) do
begin
clrscr;
for index2:=(index1*name_per_page) to ((index1+1)*name_per_page)-1 do
if(index2<namecount) then writeln(index2+1,'. ',names[index2],' ',borndate[index2],' ',pay[index2]);
gotoxy(1,24);
writeln(index1+1,'/',(namecount div name_per_page)+1,' ... Enter lenyomasara folytatodik');
repeat
enter:=readkey;
until enter=#13;
end;
end;
procedure search(option: char);
begin
clrscr;
matches:=0;
case option of
'N': begin write('Kerem a tag nevet: '); readln(search_string); end;
'E': begin write('Kerem a sz�uletesi evszamot: '); readln(search_number); end;
'F': begin write('Kerrem a fizetest: '); readln(search_number); end;
end;
index1:=0;
repeat
case option of
'N': if search_string=names[index1] then
begin
writeln(index1,'. ',names[index1],' ',borndate[index1],' ',pay[index1]);
inc(matches);
end;
'E': if search_number=borndate[index1] then
begin
writeln(index1,'. ',names[index1],' ',borndate[index1],' ',pay[index1]);
inc(matches);
end;
'F': if search_number=pay[index1] then
begin
writeln(index1,'. ',names[index1],' ',borndate[index1],' ',pay[index1]);
inc(matches);
end;
end;
inc(index1);
until index1>namecount;
if matches=0 then writeln('Nincs talalat...');
readln;
end;
procedure write_data;
begin
clrscr;
write('Kerem a nevet: ');
readln(newname);
assign(inputfile,'nevek.txt');
append(inputfile);
writeln(inputfile,newname);
close(inputfile);
end;
procedure write_menu;
begin
clrscr;
writeln(' 1: Listazas');
writeln(' 2: Kereses nevre');
writeln(' 3: Kereses sz�ul.evre');
writeln(' 4: Kereses fizetesre');
writeln(' 5: Iras');
writeln(' Egyéb: Kilepes');
writeln;
write(' Mit valaszt: ');
readln(menu);
case menu of
'1': list_names;
'2': search('N');
'3': search('E');
'4': search('F');
'5': write_data;
end;
end;
begin
read_names;
write_menu;
end.
FELADAT.PAS
[link]
Nevek.txt
[link]
[Szerkesztve]
Új hozzászólás Aktív témák
- BestBuy topik
- Hisense LCD és LED TV-k
- Motoros topic
- Intel Core Ultra 3, Core Ultra 5, Ultra 7, Ultra 9 "Arrow Lake" LGA 1851
- Megjött a jubileumi Pixel széria
- Gaming notebook topik
- Motorolaj, hajtóműolaj, hűtőfolyadék, adalékok és szűrők topikja
- OLED TV topic
- Windows 11
- Path of Exile 2
- További aktív témák...
- Apple Watch Series 9 45mm GPS !97 százalékos akkumulátor!
- TUF FX505DT 15.6" FHD IPS Ryzen 5 3550H GTX 1650 16GB 500GB NVMe +1TB magyar vbill gar
- i5 12400F dobozában, még 2 hónap Aqua garanciával
- SAMSUNG LS49AG950NPXEN 49" NEO Q-LED 5K GAMER 240HZ ! AKCIÓ
- SAMSUNG LS32DG800SUXEN ) 240HZ 4K OLED GAMER MONITOR !! AKCIÓ
- Telefon felvásárlás!! iPhone 15/iPhone 15 Plus/iPhone 15 Pro/iPhone 15 Pro Max
- ÁRGARANCIA!Épített KomPhone Ryzen 7 9800X3D 64GB RAM RTX 5090 32GB GAMER PC termékbeszámítással
- Telefon felvásárlás!! Honor 400 Lite, Honor 400, Honor 400 Pro
- PlayStation Network (PSN) ajándékkártyák, feltöltőkártyák áron alul!
- Hp Prodesk 600 G3/ G5/ G6 SFF/ i5 8-9-10 gen / Elitedesk 800 G4 /Win11- Számla, garancia
Állásajánlatok
Cég: CAMERA-PRO Hungary Kft.
Város: Budapest