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 line in the following program will cause a compiler error? #include using namespace std; int main() { int number =5; if (n
DanielleElmas [232]

Answer:

  1. #include  <iostream>
  2. using namespace std;
  3. int main() {
  4. int number =5;
  5. if (number>=0&& number <=100){
  6.    cout<<"passed.\n";
  7. }
  8. else{
  9.    cout<<"failed.\n";
  10. }
  11. return 0;
  12. }

Explanation:

There where multiple errors in the code given in the questions

Line 1: Missing <iostream>

Line 5: The comparison operator was wrong correction is highlighted

Line 12 Missing closing brace for the main function

All the errors have been fixed and the code above compiles

4 0
2 years ago
A manufacturing company has several one-off legacy information systems that cannot be migrated to a newer OS due to software com
Digiron [165]

The resiliency technique which would provide the aforementioned capabilities is: D. Full backups.

An operating system (OS) can be defined as a system software which is pre-installed on a computing device, so as to manage or control software application, computer hardware and user processes.

In this scenario, a manufacturing company cannot migrate its several one-off legacy information systems (IS) to a newer operating system (OS), due to software compatibility issues.

Resiliency can be defined as a measure of the ability of a network, server, storage system, computing system or data center, to recover quickly and continue operating when it experience adverse conditions such as:

  • Power failure.
  • Equipment failure.
  • Data loss.

In Computers and Technology, there are four (4) main resiliency technique and these include:

I. Redundancy.

II. RAID 1+5.

III. Virtual machines.

IV. Full backups.

Full backup is a resiliency technique which create backups of the systems for recovery and it allows operating system (OS) patches to be installed on computer systems.

Read more: brainly.com/question/17586013

3 0
2 years ago
Microsoft words spell checker
Degger [83]
The answer it is A i hope is good
3 0
3 years ago
Explain the purpose of Data Layer, in the Layered modelfor web applications?
matrenka [14]

Answer:

Purposes of Data Layer, in the Layered model for web applications are as following:-

1. The data Layer,is the third layer and it takes care of the all the operations concerning the database level.

2. This data layer gets a command from the application layer to send a query to the database and will process this command according to the type of database that is used.

3. It will ensure that the correct connections to the database are set.

4. It is represented by the Database.

7 0
3 years ago
The process of a web server adding a tcp header to a web page, followed by adding an ip header, and then a data link header and
kumpel [21]
<span>Encapsulation is defined as the process of adding a header in front of data supplied by a higher layer (and possibly adding a trailer as well).</span>
7 0
3 years ago
Other questions:
  • George is only familiar with VGA connector for monitors. What should you tell him are the main differences between VGA and DVI c
    8·1 answer
  • What is the name of the organization responsible for assigning public ip​ addresses?
    13·1 answer
  • Why do contour lines never cross?
    5·1 answer
  • Driving is expensive. Write a program with a car's miles/gallon and gas dollars/gallon (both floats) as input, and output the ga
    12·2 answers
  • In the language of the World Wide Web, "this page cannot be displayed" means A. your computer's software is damaged. B. the ISP
    10·2 answers
  • Write down a pair of integers whose sum is​ 0
    5·1 answer
  • If you want to transfer information transform STM to LTM, it is essential that you make the information ______________________.
    9·1 answer
  • Gun to yo head any last words??
    10·2 answers
  • In two to three sentences, define "home row" and explain why it is important.
    6·2 answers
  • A while loop should be used if you want the user to watch the same video three times.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!