Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Бассейн-5
const n = 5; var h, h_next, max, s, c, v, i : integer; begin readln ( h ); max := h; v := 0; s := 0; c := 1; for i := 2 to n do begin readln( h_next ); if h < h_next then begin if max < h_next then begin v := v + h; max := h_next; end else { max > h_next } begin v := v + c * h_next; s := 0; end; end else { h > h_next } begin s := s + h_next; c := c + 1; end; h := h_next; end; writeln (v + s); end.
run
|
edit
|
history
|
help
0
1januar2018
perpus
practica 7 ejercicio B6
07 Ariketa
Typecast an array to other type
test10
Ex5b20
03 ariketa
09 Ariketa WHYLE
https://m.facebook.com/