Ali2020

15 Reputation

One Badge

0 years, 36 days

MaplePrimes Activity


These are replies submitted by Ali2020

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