Hi, I am only beginning C#, so bear with me. I have been given this program to write. This is the question:
Write a C# application called WRITENUM that inputs a number between 0 and 2,000,000,000 inclusive and outputs that number in textual form, as we would say it or write it normally. For example if we input 1234011811 then the program will output “One billion, two hundred and thirty four million, eleven thousand, eight hundred and eleven.” If we input 0 then the program will output “Zero”. Note that commas and “and”s have been appropriately placed, the first letter of the output is capitalised, words are separated using a single space and the text ends with a full stop. A program such as this might be used as part of a financial package that prints cheques as part of its output, for example.
Your program will create a single form (window) that will allow the user to enter the number at the top and produce the textual equivalent in the middle. The form will have two buttons, a “Convert to text” button which will cause the number input by the user to be shown in textual format. The second button will be an “Exit” button which will cause the program to terminate. The program will allow the user to perform conversions until the program is terminated.
The values supplied by the user must be input into a variable of type int.
Now, I want to know is there a way to do this without having loads of if and else statements checking the numbers entered?