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
One of the biggest risks involved in using e-mail is
Maurinko [17]
The best answer to the question that is being presented above would be letter d. One of the biggest risks involved in using electronic mail or e-mail is the amount of junk mail you get from unsolicited, spamming, and phishing e-mail addresses.
8 0
3 years ago
Read 2 more answers
When _______ wordart, you need to consider both the font size of the text and the size of the text box that contains wordart?
padilas [110]
The correct answer is resizing. If you're making a logo and creating wordart. you have to care about resizing because the art needs to be clearly visible and appealing no matter the size. If you place it in a box, you have to care that it doesn't go over the edges of the box or anything similar that might seem appalling.
4 0
3 years ago
Why is the transmission of information impartial on websites?
Scrat [10]
It should be, but sometimes it isn't. It depends on the website type you visit.
7 0
3 years ago
(true or false) fortnite is the best?
GarryVolchara [31]

Answer:

FALSE ZzZzZzZz

Explanation:

Cus it is PERIOT

7 0
3 years ago
Read 2 more answers
Felicity wants to capture the attention of the regular subway commuters in her area though her print advertisements​
mel-nik [20]

Answer: billboard

Explanation:

Plato answer

8 0
3 years ago
Other questions:
  • About n processes are time-sharing the CPU, each requiring T ms of CPU time to complete. The context switching overhead is S ms.
    12·1 answer
  • In a transaction-processing system (TPS), if the TPS database can be queried and updated while the transaction is taking place,
    12·1 answer
  • One metric ton is approximately 2,205 pounds.
    6·1 answer
  • A(n) ____ is a user interface that allows users to interact with graphical objects and pointing devices.
    13·1 answer
  • Professional photography is a competitive job field. <br> true <br> false
    12·2 answers
  • A network technician is designing a network for a small company. The network technician needs to implement an email server and w
    7·1 answer
  • Describe five examples of civil engineering projects.
    6·1 answer
  • with the advent of technology one can experience special features such as 3D theater experiences true or false
    8·1 answer
  • PLEASE HELP! :)
    14·1 answer
  • Which important aspect of the Roman Empire did the barbarians destroy?
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!