I need this in C# please Create a graphical user interface that allows the users
ID: 3667229 • Letter: I
Question
I need this in C# please
Create a graphical user interface that allows the users to enter personal information such as their names, e-mail addresses, and phone numbers. Include a menu that provides a minimum of four features. The first displays the information entered by the user in a message box. The second clears the entries so that new values can be entered, the third menu option displays information about the application such as who developed it and what version it is. Another menu option closes the application. Be creative and be sure to produce an aesthetically pleasing design using options from the Format menu if you are using Visual Studio.
Explanation / Answer
class ReadingNumbers
{
static void Main()
{
Console.Write("a = ");
int a = int.Parse(Console.ReadLine());
Console.Write("b = ");
int b = int.Parse(Console.ReadLine());
Console.WriteLine("{0} + {1} = {2}", a, b, a + b);
Console.WriteLine("{0} * {1} = {2}", a, b, a * b);
Console.Write("f = ");
double f = double.Parse(Console.ReadLine());
Console.WriteLine("{0} * {1} / {2} = {3}",
a, b, f, a * b / f);
}
}
The result of program execution might be as follows (provided that we enter 5, 6 and 7.5 as input):
a = 5
b = 6
5 + 6 = 11
5 * 6 = 30
f = 7.5
5 * 6 / 7.5 = 4
In this particular example the specific thing is that we use parsing methods of numerical types and when wrong a result is passed (such as text) this will cause an error (exception) System.FormatException. This is especially true when reading real numbers, because the delimiter used between the whole and fractional part is different in various cultures and depends on regional settings of the operating system.
a = 5
b = 6
5 + 6 = 11
5 * 6 = 30
f = 7.5
5 * 6 / 7.5 = 4
In this particular example the specific thing is that we use parsing methods of numerical types and when wrong a result is passed (such as text) this will cause an error (exception) System.FormatException. This is especially true when reading real numbers, because the delimiter used between the whole and fractional part is different in various cultures and depends on regional settings of the operating system.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.