The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

FOOD FIGHT! by Llyr2002-06-03 12:42:46
  And/or clutter fight. by Llyr2002-06-03 12:46:17
    Debug this by huitzilopochtli 2002-06-03 12:51:23
PROGRAM Prvi;

TYPE Roba = RECORD
Naz: String;
Cij: Real;
Kol: Longint;
END;

VAR Art: Roba;
f: FILE OF Roba;

PROCEDURE Ispisi(Ulaz: Roba);
BEGIN
END;

FUNCTION Kraj: Boolean;
BEGIN
END;

PROCEDURE Ispis5Manje;
BEGIN
Reset(f);
Writeln;
Writeln('Ispis svih artikala kojih ima manje od 5');
WHILE NOT(Eof(f)) DO
BEGIN
Read(f, Art);
IF Art.Kol < 5 THEN
Ispisi(Art);
END;
Close(f);
END;

PROCEDURE IspisSlova;
VAR Slovo: Char;
BEGIN
Writeln;
Write('Upisite pocetno slovo artikla: ');
Readln(Slovo);
Reset(f);
WHILE NOT(Eof(f)) DO
BEGIN
Read(f, Art);
IF Art.Naz[1] = Slovo THEN
Ispisi(Art);
END;
Close(f);
END;

PROCEDURE ZapisNaKraj;
BEGIN
Reset(f);
Seek(f, FileSize(f));
REPEAT
Writeln;
Writeln('Upisite podatke o proizvodu');
Write('Naziv proizvoda: ');
Readln(Art.Naz);
Write('Cijena: ');
Readln(Art.Cij);
Write('Kolicina: ');
Readln(Art.Kol);
Write(f, Art);
UNTIL Kraj;
END;

PROCEDURE Prvih100;
VAR Tren, Naj: Roba;
n: Integer;
BEGIN
Writeln;
Writeln('Prvih 100 najskupljig artikala');
Naj.Cij := MaxLongInt;
Naj.Naz := '';
Naj.Kol := 0;
FOR n := 1 TO 20 DO
BEGIN
Tren.Cij := 0;
Tren.Naz := '';
Tren.Kol := 0;
WHILE NOT(Eof(f)) DO
BEGIN
Read(f, Art);
IF (Art.Naz <> Tren.Naz) AND
(Art.Naz <> Naj.Naz) AND
(Art.Cij >= Tren.Cij) AND
(Art.Cij <= Naj.Cij) THEN
Naj := Art;
Ispisi(Naj);
END;
END;
END;

PROCEDURE UkupnaVrj;
VAR Uk: Real;
BEGIN
Writeln;
Reset(f);
Uk := 0;
WHILE NOT(Eof(f)) DO
BEGIN
Read(f, Art);
Uk := Uk + Art.Cij * Art.Kol;
END;

Writeln('Ukupna vrijednost sve robe je ', Uk, 'kn');
END;

PROCEDURE Generate;
CONST
BEGIN
Rewrite(

END;

BEGIN
END.
[ Reply ]
      Aack! by Llyr2002-06-03 12:52:40
        please dony lynch me .. it, infact, is by huitzilopochtli2002-06-03 12:54:28
          *ducks QBASIC, apologizes for wrong lang.* by Llyr2002-06-03 12:56:34
            Attack by huitzilopochtli2002-06-03 12:57:48
              Aaaaa! Too much QBASIC/Croatian! by Llyr2002-06-03 13:00:22
                Crawls out by huitzilopochtli2002-06-03 13:03:40
                  Wouldn't that by CartaMusica2002-06-03 13:08:58
                    Me whatchfull is by huitzilopochtli2002-06-03 13:16:08
                  okay, truce :) (n/t) by Llyr2002-06-03 13:11:08
                    *evil grinning time* Hihihi (n/t) by huitzilopochtli2002-06-03 13:18:30
                      Sneak attack!!! by saxguy022002-06-03 14:59:06
                        Aagh! Binary! by Llyr2002-06-03 15:05:03
                          10101010111111100000! by saxguy022002-06-03 15:08:56

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)