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 layer enables the receving node to send an acknowledgement?
Svetllana [295]

Answer:

Data link layer enables the receiving node to send an acknowledgement.

Explanation:

The data link has following function;

1 it send the acknowledgement to the node because for the reliable    transmission.

2.Data link layer provides the interface to the network layer.

3.it regulate  the flow of data.

4.It control the transmission error.

The important function of data link layer it created packets of the data to send the packets in guarantee manner for giving the acknowledgement to the node that data is received successfully.

6 0
3 years ago
How does the technology work
Ivan

Answer:  it does – or perhaps appears to do – in the world.

Explanation:

sorry if am not right have a nice day lol

6 0
3 years ago
Read 2 more answers
Josie, your best friend, is having a huge Sweet Sixteen party. She has designated you to address all 100 of the envelopes (using
marysya [2.9K]

You add all the addresses into excel and and do mail-merge with the invitation. Adding the 100 addresses is probably a lengthy process but once this is complete you can just add on addresses and once a year or whenever you have to mail something to everyone, it's  a only mouse-click.

4 0
4 years ago
A_________is an orderly collection of fact &amp; information.
sammy [17]

Answer:

C. Database

Explanation:

4 0
3 years ago
Which programming term describes the various characteristics of an object, such as its size and color?
SashulF [63]

Answer:

A

Explanation:

6 0
4 years ago
Other questions:
  • In an airline reservation system, on entering the flight number, the flight schedule and the flight status are displayed. In thi
    8·2 answers
  • Under which menu option of a word processing program does a star appear
    8·1 answer
  • Select what's true about Search Engine Companies. Check All That Apply The information contained in a search engine database is
    12·1 answer
  • Which of the following bit patterns represents the value -9 in two’s complement notation?
    15·1 answer
  • Consider the following code segment.
    11·1 answer
  • Write a valid HTML + Python page that will count numbered from 1 to 1,000,000?​
    9·1 answer
  • Which of the following class definition defines a legal abstract class Group of answer choices public class Rectangle abstract {
    15·1 answer
  • Write a program code which asks for 80 numbers between 100 and 1000 to be entered.
    7·1 answer
  • Were is the hype house
    5·2 answers
  • In python:
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!