October 2018 1 16 Report

Daje najlepsze pierwszej lub drugiej osobie która odpowie.

Z pętli REPEAT zmień program na pętle WHILE.

Program poniżej

program repeatarytmetyczna;

var

a,r,liczbnik:integer;

begin

Writeln('oto 7 wyrazów ciągu arytmetycznego a=10 i r=2 ');

a:=10;

r:=-2;

licznik:=7;

REPEAT

write(a,' ');

a:=a+r;

licznik:=licznik-1;

UNTIL licznik = 0;

writeln;

writeln('20 wyraz ciągu to ',10+19*r ' );

readln;

end.


More Questions From This User See All

Recommend Questions



Life Enjoy

" Life is not a problem to be solved but a reality to be experienced! "

Get in touch

Social

© Copyright 2013 - 2024 KUDO.TIPS - All rights reserved.