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
Choose the best answer to complete the sentence.
zhuklara [117]

Answer:

the first one is A

the second question is B,C,F

Explanation:edg2020

5 0
4 years ago
When saving my template, I will need to select Word Template in the _____ dialog box.
Bond [772]
You will need to select the file type to be saved as a template in the save as dialog box 
4 0
3 years ago
Mary wants to send a message to Sam in such a way that only Sam can read it. Which key should be used to encrypt the message
barxatty [35]
Sam’s Public Key. Hope it helps)
6 0
3 years ago
A good sentence about art
victus00 [196]

Answer:

Art, in its broadest sense, is a form of communication. It means whatever the artist intends it to mean, and this meaning is shaped by the materials, techniques, and forms it makes use of, as well as the ideas and feelings it creates in its viewers . Art is an act of expresThe three classical branches of visual art are painting, sculpture, and architecture. Music, theatre, film, dance, and other performing arts, as well as literature and other media such as interactive media, are included in a broader definition of the arts.

sing feelings, thoughts, and observations.

Now, remove any element founded in creativity, art and design, and all that remains are piles of materials that require human imagination and visual thinking. Art forces humans to look beyond that which is necessary to survive and leads people to create for the sake of expression and meaning.

MAY THE FORC E BE WITH U

6 0
3 years ago
To check whether your writing is clear , you can
Bezzdna [24]

Answer: Hi!, hope this helps. :)

Explanation: After you proofread and do a first edit of you paper, you should either read it out loud or have someone read it back to you. Hearing the paper out loud is one of the best ways to find unclear wordings. You should also do revising. You should make sure your writing meets the requirements of the writing catagory and maybe even get a rubric of the requirements.

This is the best answer I can give, I hope this answers your question! Try to make me the brainliest if you can.

3 0
4 years ago
Read 2 more answers
Other questions:
  • numbers that the user inputs. You must use JoptionPane to input the three numbers. A first method must be called and used to dev
    13·1 answer
  • What makes it possible for e-mail to be sent and received on a wide variety of devices, including cell phones, PDAs, laptops, an
    12·1 answer
  • Your browsing the Internet and realize your browser is not responding which of the following will allow you to immediately exit
    14·2 answers
  • You're familiar with the story of Hansel and Gretel, so when you decide to go exploring you always make sure to keep track of wh
    14·1 answer
  • How do I change the selected cell to 20 pt
    8·2 answers
  • List five ways in which the type declaration system of a language such as Java or C differs from the data definition language us
    8·1 answer
  • Consider a router that interconnects three subnets: subnet 1, subnet 2, and subnet 3. suppose all of the interfaces in each of t
    11·2 answers
  • If you type too much text on a PowerPoint slide, the additional text is added to a second slide.
    9·1 answer
  • 7.3 A hydraulic lift has a mechanical advantage of 6. If the load weighs 780 N, calculate
    13·1 answer
  • If anyone can help me and get this correct I will literally venmo you and give brainliest
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!