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
____ occurs when data is entered into the computer.
tangare [24]
I would personally say input.
5 0
4 years ago
How exactly do you find the circumference by using C++ Programming? I really need a specific answer.
adelina 88 [10]

Answer:

C++ Program to Find Area and Circumference of a Circle

Area of Circle = PI X Radius X Radius. Where, Where PI is a constant which is equal to 22/7 or 3.141(approx)

Circumference or Circle = 2 X PI X Radius.

Circumference or Circle = PI X Diameter.

Explanation:

3 0
3 years ago
What number system is the basis for all of the powerful computers and electronic devices in the world?
labwork [276]

Answer:

Binary

Explanation:

3 0
3 years ago
A concave lens is also called a diverging lens. please select the best answer from the choices provided t f
nlexa [21]

The answer is true because a concave lens is also called a diverging lens.


5 0
3 years ago
1. What does the word “processing” in data pro- cessing mean?
blsea [12.9K]

Answer:

Word processing is the process of creating and editing documents on a computer. It allows a user to create documents that mimic the format and style of a typical typewriter. It requires a computer and word processing software. A printer may also be used to create a physical copy of the document.

Explanation:

6 0
3 years ago
Read 2 more answers
Other questions:
  • In presentation software, what is the area that displays behind the information you place on a slide?
    5·1 answer
  • In what stage of writing does publishing occur
    14·1 answer
  • Write a program named ArrayDemo that stores an array of 10 integers. (Note that the array is created for you and does not need t
    14·1 answer
  • alina is preparing to scan a microsoft sql server database server for open ports. what port should she expect to find supporting
    12·2 answers
  • ELO 3.6 Which type of iSCSI name requires a registered domain name to generate a unique iSCSI identifier?
    12·1 answer
  • Which of the following correctly declares and initializes a Scanner object that will use input from the keyboard as its data sou
    13·2 answers
  • List three social implications of the wider range of piracy​
    15·1 answer
  • A computer is made up of hardware and software ​
    5·1 answer
  • Which items in the list below are viruses. Click in the box to select your answer(s).
    8·1 answer
  • A company Digicom Parts manufactures 2 types of unique products for laptop and desktop computers. It manufactures 10 types of la
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!