For Programmers: Free Programming Magazines  


Home > Archive > Prolog > January 2008 > Solved Re: Translating a list of numbers









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Solved Re: Translating a list of numbers
Slobodan Blazeski

2008-01-20, 7:15 pm

On Jan 20, 5:24 pm, Cesar Rabak <csra...@yahoo.com.br> wrote:
> Slobodan Blazeski escreveu:> Hi group
>
>
>
>
> [snipped]
>
> Since you're learning:
>
>
> What's your answer to this question?
>
>
> Then proceed with this suggestion.

Solved, thanks for your help.

tran(eins,one).
tran(zwei,two).
tran(drei,three).
tran(vier,four).
tran(fuenf,five).
tran(sechs,six).
tran(sieben,seven).
tran(acht,eight).
tran(neun,nine).

listtran([],[]).
listtran([Hg|Tg],[He|Te]) :-
tran(Hg,He),
listtran(Tg,Te).

cheers
Slobodan
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com