Question: Coding in C# Please complete these steps in Visual Studio. This is the practice exercise and I am still confused on how to put these
Coding in C# Please complete these steps in Visual Studio. This is the "practice exercise" and I am still confused on how to put these into a console application
. Declare and initialize one variable of type integer, one of type float and one of type string. Give the integer variable the value 77, the float variable 22.25, and the string variable the value Value 100. Give the variables names of your choosing but use names that would give someone examining your code some idea as to what these values are used for.
Create a fourth variable by casting the float value to integer. Name the variable appropriately.
Output the values of all four variables using Console.WriteLine(), and confirm the values of the variables when you run the program
What happens to the number when you cast a double to an integer?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
