Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need help in C# Code but please provide proper comments. Please use your own unique variables names as it is mentioned in requirements and
I need help in C# Code but please provide proper comments.
Please use your own unique variables names as it is mentioned in requirements and please also tell me what I need to put in the zip code along with the code..
write a C# program that creates variables for each of these data types and assigns a unique representative value for each variable. Then, for each variable, print out a line like this: The variable aByte has the value 254 and is of the data type System.Byte That output is a single Console.WriteLine) with: Text "The variable aByte has the value Avariable (aBytel More text" and is of the data type A variable with a method faByte.GetType) And all that is on a single line. Like this: Console.Writelinel$ The variable aByte has the value (aBytel and is of the data type aByte.GetType()") Use your own unique variable names. Do one line each for: Assign a unique value for each data type that is representative of a value that needs that data type rather than a different data type For example, a large value around 250 would fit byte yet a negative number would illustrate the signed nature of sbyte. Use a number big enough that int is actually needed over the smaller integral data types, etc. o byte Sbyte o Short Int Uint o Long Ulong o Char o String o Float o Double Decimal o bool A triangle is defined as the base * height all divided by 2. Assign a value of 4.118 to a float variable representing the base. Assign a value of 17.4008 to a float variable representing the height. Output the result as "The area of the triangle is 4.1" but put the variable with the proper result in the place of 4.1 in my example End your program with a Console.ReadKey; Your program should look like my output but you must use your own unique, descriptive variable names. This includes the space between all the variable descriptions and the triangle output. Zip up the project folder as shown in class and submit that to the appropriate class drop box. The variable aByte has the value 254 and is of the data type System.Byte he variable sByte has the value -128 and is of the data type System.SByte he variable aShort has the value 32767 and is of the data type System. Int16 The variable uShort has the value 648ee and is of the data type System.UInt16 The variable aInt has the value 2147483647 and is of the data type System.Int32 he variable uInt has the value 4294967294 and is of the data type System.UInt32 he variable along has the value 9223372036854775807 and is of the data type System.Int64 he variable ulong has the value 9223372836854775888 and is of the data type System.UInt64 The variable aChar has the value and is of the data type System.Char The variable aString has the value Welcome to the Jungle and is of the data type System.String The variable aFloat has the value 3.14 and is of the data type System.Single he variable aDouble has the value 3.1415 and is of the data type System.Double he variable aDecimal has the value 5.45 and is of the data type System.Decimal he variable aBool has the value True and is of the data type System.Boolean The area of the triangle is 35.82825Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started