a)
x, s intregi
s <- 0
citeste x
cat timp x!=0 executa
{
daca x%2==0 atunci s <- s + x
citeste x
}
scrie s
b)
x, s intregi
s <- 0
citeste x
cat timp x!=0 executa
{
daca x%2!=0 atunci s <- s + x
citeste x
}
scrie s
c)
x, s intregi
s <- 0
citeste x
cat timp x!=0 executa
{
daca x%3==0 atunci s <- s + x
citeste x
}
scrie s