5.
n, nrp, nri naturale
nrp <- 0
nri <- 0
citeste n
cat timp n!=0 executa
{
daca n%10%2==0 atunci nrp <- nrp + 1
altfel nri <- nri + 1
n <- n/10
}
daca nrp==nri scrie "DA"
altfel scrie "NU
6.
n, i naturale
i <- 2
citeste n
scrie 0, " ", 1
cat timp i*i*i<=n executa
{
scrie i*i*i
i <- i + 1
}