Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- uses crt;
- var
- trojka:byte;
- liczba, potega:longint;
- begin
- clrscr;
- trojka:=3;
- potega:=1;
- writeln('Program wyswietla kolejne potegi liczby 3, az do uzyskania');
- writeln('wartosc potegi wiekszej od podanej liczby');
- writeln('Podana liczba musi byc wieksza niz 2');
- writeln;
- write('Podaj liczbe: ');
- readln(liczba);
- if liczba < 3 then
- writeln('Podana liczba jest mniejsza niz 3')
- else
- begin
- repeat
- potega:=potega*trojka;
- write(potega);
- if (potega <= liczba) then
- write(', ');
- until potega > liczba;
- end;
- readln;
- end.
Advertisement
Add Comment
Please, Sign In to add comment