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
The process of _____ determines what volume a system can handle by comparing its performance to standards in the industry? horiz
Alina [70]

BENCHMARKING

option C

5 0
3 years ago
Read 2 more answers
How long does it take to learn python
Alla [95]

Answer:

five to 10 weeks

On average, it can take anywhere from five to 10 weeks to learn the basics of Python programming, including object-oriented programming, basic Python syntax, data types, loops, variables, and functions.

:

3 0
3 years ago
Read 2 more answers
Formatting changes only the appearance of data ___it does not affect the data itself.
Vladimir [108]

Answer:

The answer to this question is "true".

Explanation:

In this question, the answer is true because The use of formatting provides changes in the data presentation, not in the data. It is also known as layout.

The layout or formatting is important for two reasons that can be given as:  

1) It makes your data like a formatted data.

2) It helps to make your data more readable.

8 0
3 years ago
If several programs or apps are running simultaneously, your computer or device might use up its
kirill [66]

Answer: I am pretty sure it's RAM

Explanation:

I'm not 100% positive bc I haven't gotten my scores back yet but I think that's it.

7 0
2 years ago
Can we draw a formula triangle for velocity?​
mafiozo [28]

Answer:

Yes we can actually draw a formula triangle for velocity

Explanation:

I can't explain why but if u wanna calculate the velocity of something using a diagram then you will draw a trapezium and in that trapezium there are two triangles and a rectangle so you will split it into two triangles and trapezium so I think we can actually draw a formula triangle for velocity

4 0
3 years ago
Other questions:
  • Which line of code will generate a random integer between 7 and 77?
    10·1 answer
  • •What are some conflicts between humans and machines that have arisen in the past?
    14·1 answer
  • One item you will NOT need to provide when opening up a bank account
    9·2 answers
  • If a piece of software designed to run on Windows XP can run on the latest version of Windows, we say the latest version of Wind
    14·1 answer
  • A student that earns a well qualified score on an ap exam would receive a ___
    13·1 answer
  • What is the most efficient way to prevent the spelling checker from repeatedly flagging a correctly spelled name in all of your
    5·1 answer
  • More registers appear to be a good thing, in terms of reducing the total number of memory accesses a program might require. Give
    14·1 answer
  • What is one reason the number of DUIs has dropped?
    7·1 answer
  • The working window of a presentation is the O outline O handout 0 notes o slide​
    5·2 answers
  • if a user watches a video with event tracking three times in a single session, analytics will count how many unique events?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!