Ali2020

15 Reputation

3 Badges

2 years, 15 days

MaplePrimes Activity


These are replies submitted by Ali2020

Thank you again @ acer 21929 

Finally i've found this :

assign(a);
c := [seq(op(i), i = a)];
d := {seq(abs(j), j = {seq(op(i), i = c)})};

So thank's @One way and @Kitoum !

Hi friends,

So thanks !
In Math 1-D is Ok !
Thanks again
See u

Hi friends,
I use Maple 2019.
The syntaxe is not write correctly

restart:
(x, y, s):= (12, 46, 0):
L:= [
    while 0 < y do
        if y::odd then s+= x; --y else x*= 2; y/= 2 fi;
        (x,y,s)
    od
];


Read again please !

"s+= x" .....???????
"if y::odd"......????????
etc
etc
etc....


 

 

@Carl Love
Thank you for answer and your good observation.
For your way, Maple say  "Error, invalid sequence"

restart:
(x, y, s):= (12, 46, 0):
L:= [
    while 0 < y do
        if y::odd then s+= x; --y else x*= 2; y/= 2 fi;
        (x,y,s)
    od
];

Hello,
So thanks, @Tomleslie i like you another way, so thanks !

Page 1 of 1