ChameL1oN

ЯП2_4

May 31st, 2015
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Prolog 0.18 KB | None | 0 0
  1. predicates
  2. nondeterm a(integer)
  3. clauses
  4. a(0):-nl,!.
  5. a(X):- Q = X mod 10, write(Q),X1=X div 10,a(X1).
  6. goal
  7. write("Chislo X?"), readint(X), nl,write("New chislo = "), a(X), nl.
Advertisement
Add Comment
Please, Sign In to add comment