[GAP Forum] Inverse operation of ListOfDigits.
Philippe Cara (Latitude)
pcara at vub.ac.be
Thu Mar 29 14:17:51 BST 2018
Dear Muniru,
Yes, it's easy:
gap> Sum([0..Length(b)-1], k -> b[Length(b)-k]*10^k);
123456
Best regards, --Philippe
On 180329, "[Muniru Asiru] maasiru at yahoo.com" <maasiru at yahoo.com> wrote:
> Dear Forum, Dear all,
>
> If I am given that
> a:=123456;; b:=ListOfDigits(a);
> Is it possible in GAP for me to recover a given b?
>
> Thanks.
>
> Dr. Muniru A. Asiru, Department of Mathematics & Statistics, The
> Federal Polytechnic, P.M.B. 55, Bida, Niger State, Nigeria. OR Dr.
> Muniru A. Asiru, P.O.Box. 294, Bida, Niger State, Nigeria. Email
> Addresses: maasiru at yahoo.com, remiasiru at yahoo.com, Mobile Phone
> number: +2348034271010
> _______________________________________________ Forum mailing list
> Forum at gap-system.org
> https://mail.gap-system.org/mailman/listinfo/forum
More information about the Forum
mailing list