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
Which of the following defines guidelines that specify the way computers access the medium to which they are attached, the type(
Tatiana [17]

Answer:

(D) Network Standard.

Explanation:

Networking standards ensures the ability of networking technologies by defining the guidelines of communication that specify way computer access the medium they are attached.Network standards also defines which type of transmission transmission to use wireless or wired,which media to use etc.

5 0
3 years ago
A search engine finds bugs and system failures in your computer.<br><br> True or False?
scZoUnD [109]
It is false search engine are used for searching for something
6 0
2 years ago
Read 2 more answers
The entities on which data are collected are _____.
sasho [114]

Answer:

<h2>ELEMENT</h2>

Explanation:

<h3>hope it helps you!!!</h3>
8 0
2 years ago
Which of these is not considered a final step when creating a Podcast? Getting a loan to help with the cost of the equipment. Ch
Neporo4naja [7]

Answer:

Option 1

Explanation:

Ok first off if your taking out a loan for your podcasting thats a issue. The other options are what you would normally do when setting it up because chances are you have the equipment necessary to start the podcast.

Hope this helps:)

6 0
2 years ago
What is the key difference between UDP and TCP protocols in TCP/IP reference model?
g100num [7]

Answer:

TCP is a connection-oriented protocol, whereas UDP is a connectionless protocol. The speed for TCP is slower while the speed of UDP is faster.

5 0
2 years ago
Read 2 more answers
Other questions:
  • An expression that has correctly paired delimiters is called a(n)
    6·1 answer
  • It is important to create an IT security program structure that aligns with program and organizational goals and describes the o
    6·1 answer
  • RFID tags uses memory that is read-only.A. TrueB. False
    5·1 answer
  • All tif files start at offset 0 with what 6 hexadecimal characters?​
    11·1 answer
  • Unlike memory, this type of storage holds data and programs even after electrical power to the computer system has been turned o
    10·1 answer
  • If you were any type of fnaf charater who would you be and why?
    10·2 answers
  • List of rules for expert systems​
    6·1 answer
  • Each contestant auditioned her singing voice for the pageant. Participle: Word it Modifies:​
    14·1 answer
  • The BCD number for decimal 473 is( ). a) 111011010; b) 010011110011; c) 010001110011; d)0010110110​
    15·1 answer
  • Change the file name for index.html to index.php
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!