Here is what I want to create: A program where the user can enter any decimal number and is told all the qualities of that number. (For example: even/odd, divisible by 2/5/10, is a prime number, etc...)
Sadly I'm already failing at grabbing the number from the user input.
I need a TextBox that only allows Numbers. (I know NumericUpDown is an option but I wanted to try it with a TextBox)
I need to convert the String from the TextBox into a
float
(?) (ordouble
?). I knowint
won't work because I don't want it to cut all the decimal places.I need to test the number for all the qualities and then report back. (I´ll manage that).
I need help with steps 1 & 2.