Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
task 1
Program n_1; const N = 10; var a: array[1..10] of integer; i, min, max:integer; begin min := 0; max := 0; randomize; write('Входной массив:'); for i := 1 to 10 do begin a[i] := random(10); write(a[i]:3); end; writeln; for i := 1 to 10 do begin if (a[i] > 0) and (a[i] mod 2 = 0) then begin if (min = 0) and (max = 0) then begin min := a[i]; max := a[i]; end else begin if a[i] < min then min := a[i] else if a[i] > max then max := a[i]; end end end; if (max=0) and (min=0) then writeln('нет нужных элементов') else writeln('Min = ', min, ', Max = ', max); end.
run
|
edit
|
history
|
help
0
Find Highest,Lowest and average using two dimensional arrays
Reflection custom test
Just tries to add/remove items to the list
Collatz Conjecture
file hasher
1
Fórum Parallel Threads ( With Much Fun )
438935
h
Gestion de stock