1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
scoray [572]
3 years ago
7

In this chapter, you learned that although a double and a decimal both hold floating-point numbers, a double can hold a larger v

alue. Write a 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.
Computers and Technology
1 answer:
Tju [1.3M]3 years ago
8 0

Answer:

The DoubleDecimalTest class is as follows:

using System;

class DoubleDecimalTest {

 static void Main() {

     double doubleNum = 173737388856632566321737373676D;  

    decimal decimalNum = 173737388856632566321737373676M;

   Console.WriteLine(doubleNum);

   Console.WriteLine(decimalNum);  } }

Explanation:

Required

Program to test double and decimal variables in C#

This declares and initializes double variable doubleNum

     double doubleNum = 173737388856632566321737373676D;

This declares and initializes double variable decimalNum (using the same value as doubleNum)

     decimal decimalNum = 173737388856632566321737373676M;

This prints doubleNum

   Console.WriteLine(doubleNum);

This prints decimalNum

   Console.WriteLine(decimalNum);

<em>Unless the decimal variable is commented out or the value is reduced to a reasonable range, the program will not compile without error.</em>

You might be interested in
If you are interested in a specific employer, but there are no job openings with the company, what steps should you take while y
GenaCL600 [577]

There are several ways you can inquire about a job or send an application even when the company isn’t hiring. One way that works best is to know the company. Don’t just like the company, have a particular demonstrated interest in that company. Understand their services and love their product. Another way is to enlist your network and connect with people on the inside who can give you tips on getting noticed. You can also send a letter of interest. In it, do not ask for a job. Explain yourself the value you will bring to their business. You can also show up on their doorstep and hand deliver a CV.

7 0
3 years ago
Read 2 more answers
The __________ method can determine whether a string contains a value that can be converted to a specific data type before it is
luda_lava [24]

Answer:

tryparse method

Explanation:

You can convert a string to a number by calling the TryParse method found on various numeric types (int, long, double, etc.), or by using methods in the System.Convert class.

8 0
3 years ago
research the internet and develop a list of three important rules/standards you will give to the team to help everyone easily fi
natima [27]
The three important rules/standards that I can give to the team to help everyone easily find the documents in the future are the following:
1. Develop naming convention on how to define filename/documents.
2. All changes in the documents must be well documented, there should be a record of changes.
3.There must be a defined standard procedures on how to save and access the file, and who are allowed to modify the documents.
6 0
4 years ago
High quality information pages, such as Wikipedia articles and IMDb pages, should always get a rating of Highly Meets. (T/F)
deff fn [24]

Answer:

The correct answer to the following question will be "True".

Explanation:

Surely, indeed, heavy-quality information sites including such articles on Wiki and IMDb pages should earn an extremely-meets rating. That's because such pages are genuinely insightful and easy to understand.

Therefore, the given statement is true.

6 0
3 years ago
___ is two or more connected computers
quester [9]
NETWORK is two or more computers connected together
8 0
3 years ago
Other questions:
  • Write a function called ReverseLetters that takes an input phrase consisting of a single word and reverses the sequence of lette
    15·1 answer
  • How far is florida from oklahoma?
    10·2 answers
  • HURRY
    5·1 answer
  • Vhat is output by the code below?<br><br> PLEASE HELP!! TIME LIMIT!!
    5·1 answer
  • Cell references in a formula are called _____.<br> a. assumptionsc. numbersb. valuesd. content
    11·1 answer
  • If classes C1 and C2 both implement an interface Cint, which has a method whichIsIt, and if C1 c = new C1( ); is performed at on
    15·1 answer
  • What is one advantage of inserting a page number field in your document instead of inserting the actual page number?
    14·1 answer
  • What is the feature of ram for beginners
    5·2 answers
  • The following are types of numbers except one. Select the one which is not an integer.
    11·1 answer
  • What is the role of the computer in banking system?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!