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]
3 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]3 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
Help please not trying to fail
deff fn [24]

Answer:

B. Everywhere CFCI is not

8 0
3 years ago
A sequence of repetitive operations performed to evaluate the ability of a PC to operate at peak efficiency for a defined time p
iragen [17]

Answer:

False.

Explanation:

The description provided matches better with Software performance testing, and shouldn't be confused with a benchmark.

In computing, a benchmark is a tool or software designed to measure the average performance of another program, by running several tests and trials against it.

A performance testing is designed to measure the performance and responsiveness of a computer system (not a program) under a heavy workload.

8 0
3 years ago
Niall is revising a history assignment using a word processor on a Windows computer. He wants to copy a section from an earlier
Zarrin [17]

Answer:Ctrl + V

Explanation:

7 0
2 years ago
Discuss the inte Generation of computer, Inlith
ch4aika [34]

Generations of Computers

The computers of today find their roots in the second half of the twentieth century. Later as time progressed, we saw many technological improvements in physics and electronics. This has eventually led to revolutionary developments in the hardware and software of computers. In other words, soon the computer started to evolve. Each such technological advancement marks a generation of computers.

3 0
3 years ago
9.10: Reverse ArrayWrite a function that accepts an int array and the array ’s size as arguments . The function should create a
AleksandrR [38]

Answer:

#include <iostream>

using namespace std;

int * reverse(int a[],int n)//function to reverse the array.

{

   int i;

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

   {

       int temp=a[i];

       a[i]=a[n-i-1];

       a[n-i-1]=temp;

   }

   return a;//return pointer to the array.

}

int main() {

   int array[50],* arr,N;//declaring three variables.

   cin>>N;//taking input of size..

   if(N>50||N<0)//if size greater than 50 or less than 0 then terminating the program..

   return 0;

   for(int i=0;i<N;i++)

   {

       cin>>array[i];//prompting array elements..

   }

   arr=reverse(array,N);//function call.

   for(int i=0;i<N;i++)

   cout<<arr[i]<<endl;//printing reversed array..

   cout<<endl;

return 0;

}

Output:-

5

4 5 6 7 8

8

7

6

5

4

Explanation:

I have created a function reverse which reverses the array and returns pointer to an array.I have also considered edge cases where the function terminates if the value of the N(size) is greater than 50 or less than 0.

8 0
3 years ago
Other questions:
  • Pendant Publishing edits multi-volume manuscripts for many authors. For each volume, they want a label that contains the author'
    14·1 answer
  • P**nhub or x-videos or other
    9·1 answer
  • on average, someone with a bachelor’s degree is estimated to earn _______ times more than someone with a high school diploma
    13·1 answer
  • In C, developers may access arrays via bracketed syntax like Java or by using * dereferencing notation. The following assignment
    5·1 answer
  • Warm colors including red, yellow and orange _____________ be energetic and exciting to the eye, while cool colors in blue, gree
    11·1 answer
  • Consider the following skeletal C program: void fun1(void); /* prototype */ void fun2(void); /* prototype */ void fun3(void); /*
    11·1 answer
  • - Which amongst the following is not a Characteristic of Cloud Computing?
    5·1 answer
  • Write a recursive method to form the sum of two positive integers a and b. Test your program by calling it from a main program t
    8·1 answer
  • If the three operations were combined, O(logN) + O(N) * O(logN) + 1, the overall algorithm cost would be:________
    6·1 answer
  • "code is broken down by the computer until it is in _____and is a very long series of ons and offs
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!