|
Ponizej listing programu niewiem czy nie pomyliłes sie w kazdym bac razie wypisuje grosze tez słownie a jezeli to nie był bład zaraz bedzie 2 listing
program blooop;
uses Crt;
var liczba : string[40];
i :integer;
j :integer;
procedure pokaz_liczbe(i:integer);
begin
if liczba[i]='0' then write('zero*');
if liczba[i]='1' then write('jeden*');
if liczba[i]='2' then write('dwa*');
if liczba[i]='3' then write('trzy*');
if liczba[i]='4' then write('cztery*');
if liczba[i]='5' then write('pięć*');
if liczba[i]='6' then write('sześć*');
if liczba[i]='7' then write('siedem*');
if liczba[i]='8' then write('osiem*');
if liczba[i]='9' then write('dziewięć*');
if (liczba[i]=#00) and (j=0) then write('złote.');
if (liczba[i]=#00) and (j=1) then write('grosze.');
if liczba[i]='.' then
begin
write('złote.'); j:=1
end;
end;
begin
clrscr;
j:=0;
write('Podaj liczbe ?');readln(liczba);
writeln;
i:=0;
write('*');
repeat
i:=i+1;
pokaz_liczbe(i);
until liczba[i]=#00;
writeln;
readkey;
end.
|