1.
citeste x;
n <- 0;
cat timp x > 0 sau x < 0 ( pt ca x e declarat intreg )
{ y <- x;
c <- 0;
cat timp y>0
{ daca y%10 > 5
c <- y%10;
y <- y/10;
}
n <- n*10 + c;
afiseaza x;
citeste x;
}
afiseaza n;
STOP
2.
citeste x;
citeste y; ( am scris si asta,pt ca y trebuie citit ca se sa prelucreze)
cat timp x>y
y <- y*10+9-x%10;
afiseaza y;
STOP