Răspuns :
Salut!
Ai rezolvarile mai jos in pseudocod
4.
start
natural x, cnt, maxi
cnt <- 0
maxi <- -100000000
cat_timp x <> 0
citeste x
daca x > maxi
maxi = x
cnt <- 0
cnt <- cnt + 1
sfarsit_daca
daca x = maxi
cnt <- cnt + 1
sfarsit_daca
sfarsit_cat_timp
scrie maxi, cnt
stop
5.
start
natural x, maxineg, minineg, maxipoz, minipoz
maxineg <- -100000000
minineg <- 100000000
maxipoz <- -100000000
minipoz <- 100000000
cat_timp x <> 0
citeste x
daca x > 0
daca x > maxipoz
maxipoz <- x
sfarsit_daca
altfel_daca x < minipoz
minipoz <- x
sfarsit_altfel_daca
altfel
daca x > maxineg
maxineg <- x
sfarsit_daca
altfel_daca x < minineg
minineg <- x
sfarsit_altfel_daca
sfarsit_altfel
sfarsit_cat_timp
scrie maxipoz, minipoz, maxineg, minineg
stop