You've lost me on that one.
I know how to convert decimal to binary, both on paper and in a program. It was one of the first assignments we ever did. However, when I look at his partial code and I look at the assignment we first did, it looks nothing alike.
Second, I don't really understand loops that well. My loops always return with errors and I'm never sure how to correct them.
Third, does this seem more like he wants two different prompts, first asking the user for a decimal and converting to binary, followed by a prompt asking to enter a binary and convert it to decimal? That wouldn't be too difficult I don't think, but if he wants the program to automatically detect which was entered and convert it, I don't have the slightest clue how to do that.