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
tiny-mole [99]
4 years ago
13

Which statement outputs a double value in a field of nine characters with three digits after the decimal point?

Computers and Technology
1 answer:
zimovet [89]4 years ago
3 0

Answer:

Console.WriteLine("Format Double: {0:n3}", num); //formatting output with 3 digit decimal point

Explanation:

Following are the program in c#

using System; // namespace  

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace Tasks

{

   class Program 2 // program2

   {        

                 

       static void Main(string[] args) // Main function

       {

 

           double num = 958254.73789621;   // variables          

           Console.WriteLine("Format Double: {0:n3}", num); //formatting output with 3 digit decimal point

           Console.Read();

       }

   }

}

Output:

Format Double : 958254.737

Here we have declared  a variable num of type double which store the value num=958254.73789621. To do format with the double number i used a syntax {0:n3}. This syntax {0:n3}is separated with :(colon) here 0 represent the value before the decimal point that is 958254 and n3 represent the value upto 3 decimal points. Hence this statement give the output with three digit after the decimal point .

 

You might be interested in
github Portfolio Balances An investor opens a new account and wants to invest in a number of assets. Each asset begins with a ba
OLEGan [10]

The following code will be used to determine the maximum amount invested

<u>Explanation:</u>

long maxValue(int n, int rounds_rows, int rounds_columns, int into rounds)

{

   // Define the variable to store

   // the maximum amount invested.

   long max = 0;

   

   // Define an array of size n,

   // to store the n investments.

   long *investments = (long*)malloc(sizeof(long)*n);

   int i=0;  

   // Initially set all

   // the investments to 0.

   for(i=0;i<n;i++)

   {

       investments[i] = 0;

   }

   i=0;

   // Run the loop to

   // perform the rounds.

   while(i<rounds_rows)

   {

       // Get the left value

       // of the current round.

       int left = rounds[i][0];

       

       // Get the right value

       // of the current round.

       int right = rounds[i][1];

       // Get the contribution

       // for the current round.

       int contribution = rounds[i][2];

       // Since the user uses 1-based

       // indexing, subtract 1 from left

       // and right as the program uses

       // 0-based indexing. That is, the

       // investments in the array start

       // from 0 and not 1.

       right = right - 1;

       int j=0;

       // Run the loop to add the

       // contribution to all the investments

       // between left and right, both inclusive.

       for(j=left; j<=right; j++)

       {

           investments[j] += contribution;

       }

       i++;

   }

   // Traverse the investments array

   // to find the maximum element.

   max = investments[0];

   for(i=1; i<n;i++)

   {

       if(investments[i]>max)

       {

           max = investments[i];

       }

   }

   // Return the

   // maximum investment.

   return max;  

}

6 0
4 years ago
On Brainly, how can I change my username? from halfsidepancake​
klio [65]

Answer:

unfortunately you cant change your username.... i tried 2 and the only way is to make a new account

Explanation:

8 0
3 years ago
Read 2 more answers
how to answer the questions on brainly? I've typed my answer in the box but there's no submit button or whatever, and the only t
Zigmanuir [339]

Answer:

push the add your answer button

Explanation:

4 0
3 years ago
Read 2 more answers
a colleague shared an excel file with you, and you want to display a worksheet that is hidden in it. how can you do that?
Sonja [21]

The hidden worksheet can be made visible with the right click on any worksheet and select unhide.

<h3>What is a worksheet?</h3>

A worksheet in Microsoft Excel is the collection of the rows and column that has been used to organize data. The collection of worksheets is called workbook.

The hidden worksheets are not visible in the workbook, and if an individual wants to unhide the hidden worksheet, he must right-click on any worksheet and select unhide.

Learn more about worksheet, here:

brainly.com/question/1024247

#SPJ1

4 0
2 years ago
Having a legitimate reason for approaching someone to ask for sensitive information is called what?
PIT_PIT [208]
It’s called Impersonation
5 0
3 years ago
Other questions:
  • While designing web pages for mobiles, the page content should be extensive such that the readers get the opportunity to explore
    5·2 answers
  • A ________ editor was the dominant way film was edited up until the early '90s.
    7·2 answers
  • Which skill refers to the ability to visualize and implement possible business solutions to problems?
    6·1 answer
  • How to find determinant of ​
    15·1 answer
  • Which of the following refers to a descriptive technique involving the systematic collection of quantitative​ information? A. Lo
    5·1 answer
  • Breaking code rules is only a problem once in a while. Group of answer choices True False
    12·1 answer
  • The measure means to determine the exact size, amount, or distance of something
    11·1 answer
  • Each pixel includes 3 colors; Red, Green and Blue. Each color uses 8 bits to store it's intensity. How many Bytes are needed for
    12·1 answer
  • Write features of Fifth Generation of computer?​
    12·2 answers
  • What features could be improved in microsoft word?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!