Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
array
program nizuredjenjesortiranje; const max=100; var niz:array[1..max] of real; pom:real; n,i,j:integer; begin writeln('Unesite broj elemenata niza: '); read(n); i:=1; writeln(n); writeln('Unesite elemente niza: '); while(i<=n) do begin read(pom); if(pom>0) and (pom<max) then begin niz[i]:=pom; i:=i+1 end else writeln('Neodgovarajuc unos!') end; writeln('Niz je: '); for i:=1 to n do write(niz[i]:0:2,' '); writeln(); for i:=1 to n-1 do for j:=i+1 to n do if (niz[i]>niz[j])then begin pom:=niz[i]; niz[i]:=niz[j]; niz[j]:=pom end; writeln('Niz je: '); for i:=1 to n do write(niz[i]:0:2,' ') end.
run
|
edit
|
history
|
help
0
mang
zad27-notoptimized
La calculatrice
bilete
Find the greatest integers - v1
Gertie
pascal1
Mat
3
mulitp