mish1995

0 Reputation

One Badge

10 years, 126 days

MaplePrimes Activity


These are replies submitted by mish1995

@Rouben Rostamian  Oh and for the record, my code is as follows:

decToBin := proc (n::integer) if n < 0 then NULL else convert(n, binary) end if end proc;
decToBin(10);
print(`output redirected...`); # input placeholder
1010
decToBin(163);
print(`output redirected...`); # input placeholder
10100011
decToBin(213);
print(`output redirected...`); # input placeholder
11010101
decToBin(-1);
print(??); # input placeholder
decToBin("A");
%;
Error, invalid input: decToBin expects its 1st argument, n, to be of type integer, but received A
restart;

Enjoy :)

@Rouben Rostamian  Chill, the homework was due yesterday. I was curious as to how to do it. But thank you for NOT replying to the answer and instead ignoring it. :)

Page 1 of 1