January 2019 1 10 Report
Muszę narysować schemat blokowy dla poniższego algorytmu:
"uses crt;
var
a, suma, sr: real;
ile: integer;
begin
clrscr;
ile:=0;
a:=0;
suma:=0;
repeat
write('Podaj kolejna liczbe (-1:koniec) :');
readln(a);
if a<>-1 then
begin
ile:=ile+1;
suma:=suma+a;
end;
until a=-1;
if ile>0 then
writeln('Srednia arytmetyczna dla ',ile,' liczb wynosi ',(suma/ile):8:4)
else
writeln('Nie wprowadzono danych');

readkey;
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.