# I cant do this question ive tried lots of code but cant get it to work. I use console application

• ### Question

• Using this information, write a menu driven program that will:

 Convert any integer (0 to 255) to binary

 Convert any integer (0 to 255) to hexadecimal

 Convert a 8-bit binary unsigned integer to decimal

 Convert a 2-digit hexadecimal unsigned integer number to decimal.

Each of these tasks is to be performed by a function and called appropriately by the Main block. Please also use appropriate functions and procedures to display the menu and to allow the user to choose an option. The main menu should be re-displayed after each task until the user chooses to quit. Please do not use any global variables and pass parameters when data values need to be shared.

Monday, October 30, 2017 5:28 PM

### All replies

• Hi

Are you passing your school homework onto others to do for you?

Regards Les, Livingston, Scotland

Monday, October 30, 2017 5:44 PM
• To do this you would first learn what an Integer and a decimal is. It is just a word for a value description.

https://docs.microsoft.com/en-us/dotnet/visual-basic/language-reference/data-types/data-type-summary

Hexadecimal is the word for humans readable character representation to represent a value given in bits (0 and 1).

Binary is a word that tells what the value is in bits.

There is for the later 2 in .Net not any way to get that or you should first convert that in a way to characters.

A character is nothing more than a code given to a value to represent one of the unicode characters.

Binary and Hexadecimal are no value types, just human words.

Success
Cor

Monday, October 30, 2017 5:45 PM
• Take a look at

and

"Those who use Application.DoEvents() have no idea what it does and those who know what it does never use it" - MSDN User JohnWein

• Proposed as answer by Monday, October 30, 2017 7:22 PM
Monday, October 30, 2017 6:51 PM
• No im not i just cant figure out the code its to be done in free time

IM sttruggling with the code

Monday, October 30, 2017 7:34 PM
• No im not i just cant figure out the code its to be done in free time

IM sttruggling with the code

There are examples at the link dbasnett has posted for you.  He gave you links to some methods that will do what you are asking.   8)

If you say it can`t be done then i`ll try it

Monday, October 30, 2017 8:07 PM
• No im not i just cant figure out the code its to be done in free time

Are you sure that this is a VB .Net task?   If you are having difficulty starting the code then that might be because of insufficient context.  For instance, is this a console app or a Windows Forms app?  The implication is that it is a console app, and that significantly complicates the process.  If it was a Windows Forms app you would start with the designer, not with code.

Monday, October 30, 2017 9:27 PM
• No im not i just cant figure out the code its to be done in free time

Are you sure that this is a VB .Net task?   If you are having difficulty starting the code then that might be because of insufficient context.  For instance, is this a console app or a Windows Forms app?  The implication is that it is a console app, and that significantly complicates the process.  If it was a Windows Forms app you would start with the designer, not with code.

Hi

OP says it's a Console App in thread title.

Regards Les, Livingston, Scotland

• Edited by Monday, October 30, 2017 9:45 PM
Monday, October 30, 2017 9:45 PM
• No im not i just cant figure out the code its to be done in free time

IM sttruggling with the code

What code?  You haven't posted any code.  If you post what you are attempting to do then the community can offer you more focused assistance.
Monday, October 30, 2017 9:52 PM
• No im not i just cant figure out the code its to be done in free time

IM sttruggling with the code

Hi Willow230301,

Please post some code here, let us see what do you want to do and where do you encounter some problems.

Best Regards,

Cherry

MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

Tuesday, October 31, 2017 5:51 AM
• No im not i just cant figure out the code its to be done in free time

IM sttruggling with the code

Give us a real life purpose for the question, because your question looks so strange.

(Beside in school assignments when it is often done).

Success
Cor

Tuesday, October 31, 2017 11:36 AM
• To create a Console menu, start with a Do loop.  List the items for the user to select.  Then use Select Case for the user's choice.  Each case will call one of the functions you need to continue.  After the function completes, it will return to the menu for the user to make another selection.  One of the menu choices should be to exit the loop.

Solitaire

Tuesday, October 31, 2017 5:54 PM