this is a Joyce Farrell Book I am using. Name of book Visual C# 2015, An Introdu
ID: 3766764 • Letter: T
Question
this is a Joyce Farrell Book I am using. Name of book Visual C# 2015, An Introduction to Object-Oriented Programming
Write C# program named DoubleDecimalTest that declares and displays two variables-a double and a decimal. Experiment by assigning the same constant value to each variable so that the assignment to the double is legal but the assignment to the decimal is not. In othe words, when you leave the decimal assignment statement in the program, an error message should be generated that indicates the value is outside the range of the type decimal, but when you comment out the decimal assignment and its output statement, the program should compile correctly.
Explanation / Answer
Sample code:
Sample output:
Keep the assignment statement in coments:
Sample code:
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.