Good night:

I'm trying to make a homework but I couldn't create the algoritm.

Wanted is this: Entered as an input Binary(2), Octal(8), Hexadecimal(16) or Decimal(10), knowing which format is and converting to other formats...

For example; user enters 0100010.

program must give an output that says "this is a binary number".

and the equals in decimal, hexadecimal and octal.

EXAMPLE RUN:

Enter a number: 0100010

It is a binary number.

Octal of 0100010 is: XXXXXX.

Hexadecimal of 0100010 is YYYYYY.

Decimal of 0100010 ZZZZZ.

thank you..