Write a program that uses the conversion specifier g to output the value 9876.12345. Print the value with precisions ranging from 1 to 9.

Answers

Answer 1

Answer:

Written in C++

#include <stdio.h>

int main(){

   double value = 9876.12345;

   printf("1: %.1g\n", value);

   printf("2: %.2g\n", value);

   printf("3: %.3g\n", value);

   printf("4: %.4g\n", value);

   printf("5: %.5g\n", value);

   printf("6: %.6g\n", value);

   printf("7: %.7g\n", value);

   printf("8: %.8g\n", value);

   printf("9: %.9g\n", value);

   return 0;

}

Explanation:

This declares and initializes value as double

   double value = 9876.12345;

This prints the first precision

   printf("1: %.1g\n", value);

This prints the second

   printf("2: %.2g\n", value);

This prints the third

   printf("3: %.3g\n", value);

This prints the fourth

   printf("4: %.4g\n", value);

This prints the fifth

   printf("5: %.5g\n", value);

This prints the sixth

   printf("6: %.6g\n", value);

This prints the seventh

   printf("7: %.7g\n", value);

This prints the eight

   printf("8: %.8g\n", value);

This prints the ninth

   printf("9: %.9g\n", value);

The precision is printed using the following syntax: printf("%.ag\n", value);

Where a represents the number of digits to print


Related Questions

Wake up to reality. Nothing ever goes as planned in this world. The longer you live,the more you realize that only pain, suffering and futility in this reality.

what show is this from correct answer gets brainly (i already know what show its from)​

Answers

Answer:

Naruto

Explanation:

Madara Uchiha said that TwT

-LavenderVye

A local bank has just one branch. It sets up a peer-to-peer network for all devices on the system. The bank would like to be able to have one technician administer the entire network from his location outside the bank without having to go to the bank each time there is a problem. Will this be possible for the technician?

A. It will not work because it is not possible to have the technician administer from one single location.

B. It will not work because the bank needs to use a server in a central location to allow for the remote access.

C. It will work as long as a LAN network is established to facilitate the communication between devices.

D. It will work if it uses a WAN to bring in all of the LANs to one central location.

CORRECT ANSWER IS B!

Answers

B
Good luck hope you get a good grade

It will not work because the bank needs to use a server in a central location to allow for the remote access, hence option B is correct.

What is a peer-to-peer network?

A distributed application architecture known as peer-to-peer computing or networking divides jobs or workloads across peers.

Peers are equally qualified and capable members of the network. They are referred to as the nodes in a peer-to-peer network.

In the hypothetical situation, the technician is unable to manage the complete network from outside the bank. Every time a problem arises, the technician must visit the bank.

Therefore, in order to give them the desired remote access, I need a server that is situated in a strategic location, hence option B is correct.

Learn more about peer-to-peer network, here:

https://brainly.com/question/10571780

#SPJ5

what is a decryption key?​

Answers

Answer:

A decryption key is a digital information used to recover the plain text from the corresponding ciphertext by decryption.

PLZZZZZZZZZZZZZZZ HELP ME OUT!!!!! I SICK AND TIRED OF PEOPLE SKIPING MY QUESTION WHICH IS DUE TODAY!!!!ANSWER THEM ALL PLZ

DIABETES: What causes this condition? *

DIABETES: What are the symptoms of this condition? *


DIABETES: Does this condition explain why Elisa may be tired? (Why or why not?) *

DIABETES: Which molecule is most likely affected by this condition: oxygen, glucose, or amino acids? *

ANEMIA: What causes this condition? *

ANEMIA: What are the symptoms of this condition? *

ANEMIA: Does this condition explain why Elisa may be tired? (Why or why not?) *


ANEMIA: Which molecule is most likely affected by this condition: oxygen, glucose, or amino acids? *

Answers

Answer:

Explanation:

Being overweight, eating unhealthy, and not exercising can cause diabetes.

Some symptoms of diabetes are being sleepy, being very thirsty, losing weight without trying to, being very hungry, having dry skin, and your hands or feet being numb are some symptoms.

This conditions does explain why Elsa may be tired because tiredness is a symptom of diabetes.

Glucose is most likely affected by diabetes.

Having a shortage of iron in your body causes anemia

Symptoms of anemia are weakness, fatigue, shortness of breath, pale skin, chest pain, and dizziness.

Anemia may be the reason Elisa is tired because it causes fatigue and weakness.

Oxygen is most likely affected by anemia.

Write a C++ program that reads a temperature value and the letter C for Celsius or F for Fahrenheit. Print whether water is liquid, solid, or gaseous

Answers

Answer:

(1) #include<iostream>

(2) #include<conio.h>

(3) using namespace std;

(4) void main()

(5) {  

(6) float temp;

(7) char sel;

(8)    cout<<“Select a temperature value in Celcius or Fahrenheit.\n”;

(9)   cout<<“Press C for Celcius.\n”;

(10)   cout<<“Press F for Fahrenheit.\n”;

(11)  cin>>sel;

(12) switch (sel)

(13){

(14)case ‘C’:

(15) cout<<“Enter a temperature value in Celcius: “;

(16)cin>>temp;

(17) if(temp<=0)

(18)   {

(19)   cout<<“Water is solid at “<<temp<<” degree C.”;

(20)   }

(21)  else if(temp>=100)

(22)   {

(23)  cout<<“Water is gaseous at “<<temp<<” degree C.”;

(24) }

(25) else

(26)    {

(27)   cout<<“Water is liquid at “<<temp<<” degree C.”;

(28)  }

(29)         break;

(30)  case ‘F’:

(31)     cout<<“Enter a temperature value in Fahrenheit: “;

(32)   cin>>temp;

(33)   if(temp<=32)

(34)  {

(35)  cout<<“Water is solid at “<<temp<<” degree F.”;

(36)    }

(37)    else if(temp>=212)

(38)  {

(39)   cout<<“Water is gaseous at “<<temp<<“degree F.”;

(40)  }

(41)    else

(42)   {

(43)  cout<<“Water is liquid at “<<temp<<” F.”;

(44)    }        

(45)    break;

(46)  }  

(47)   getch();

(48) }

Which statements are true about different software?

You can use a word processor to write, edit, print, and perform a variety of modifications on a document. Word processors work with entirely text-based documents without images or video. Spreadsheet programs enable users to perform statistical functions and create charts and graphs for data analysis. Managers can use database software to discuss financial performance with the help of slideshows. Graphics software, audio- and video-editing software, and media players are all examples of system software.

Answers

Answer:

You can use a word processor to write, edit, print, and perform a variety of modifications on a document.

Spreadsheet programs enable users to perform statistical functions and create charts and graphs for data analysis.

Explanation:

Took the test

What is the character missing in the line of code below that is part of the pseudocode outline of a program?
______ Get the user's height.

Answers

Answer:

# Get the user's height.

Explanation:

The answer is #

Answer: #

Explanation: got it right on edgen

d) Software which is basically language translation software.​

Answers

Answer:

tayanaf

Explan

ation:صثح

Write a calculator program that will allow only addition, subtraction, multiplication & division. Have the
user enter two numbers, and choose the operation. Use if, elif statements to do the right operation based
on user input. using python

Answers

num1 = float(input("Enter the first number: "))

num2 = float(input("Enter the second number: "))

operation = input("Which operation are you performing? (a/s/m/d) ")

if operation == "a":

   print("{} + {} = {}".format(num1, num2, num1+num2))

elif operation == "s":

   print("{} - {} = {}".format(num1, num2, num1-num2))

elif operation == "m":

   print("{} * {} = {}".format(num1, num2, num1*num2))

elif operation == "d":

   print("{} / {} = {}".format(num1, num2, num1/num2))

I hope this helps!

A file named numbers.txt contains an unknown number of lines, each consisting of a single positive integer. Write some code that reads through the file and stores the largest number read in a variable named maxvalue.
** PYTHON**

Answers

f = open("numbers.txt", "r")

lst = [int(x) for x in f.read().splitlines()]

maxvalue = max(lst)

This works for me. Best of luck. If you want to test the code in an ide, use print(maxvalue) at the end of the code to see the value of your maxvalue variable.

(Print distinct numbers) Write a program that reads in numbers
separated by a space in one line and displays distinct numbers (i.e., if
a number appears multiple times, it is displayed only once). (Hint:
Read all the numbers and store them in list1. Create a new list list2.
Add a number in list1 to list2. If the number is already in the list,
ignore it.)

Answers

I've included my code in the picture below.

Which company is producing laptops nowadays? *
Cute
Aspire
Dell
Innovative

Answers

Answer:

dell

thanks for points

Write a single SQL statement to produce each of the following.

a. For each customer order, list the order id, order date, order_source_id source description, and the first and last name of the customer.
b. For each customer order, list the order id, order date, meth_pmt, the first and last name of the customer placing the order.
c. For each line in shipment_line, display the shipment_id, inv_id, ship_quantity, date_expected and date_received.

Answers

Answer:

a. SELECT order_id, order_date, order_source_id, source_description, first_name || last_name AS customer_name

        FROM customer_order;

b. SELECT order_id, order_date, meth_pmt, first_name || last name AS customer_name

        FROM customer_order;

c. SELECT shipment_id, inv_id, ship_quantity, date_expected, date_received

       FROM shipment_line;

Explanation:

When using SQL statements to display a certain amount of information, the SELECT syntax is used. It is written as;

          SELECT X, Y, Z

             FROM alphabets;

The SELECT statement is used to list the variables to be displayed which are usually separated by a coma.

The FROM indicates the table from which the variables should be extracted from.

The ; sign signifies the end of an SQL statement and that you want your query to be run

This "first_name || last_name AS customer_name" tells SQL to combine the first and last name of customers and display them as customer_name.

       

explain why it is wise to remember your social security number

Answers

If you know your number, you may never need your card again. It is the number, not the card, that is most important. Your Social Security number is nine digits, that is only two digits more than a phone number. If you don't know it by heart, now is a great time to commit it to memoryy

It is vital to remember your social security number as one can work or go places cardless without always carrying the card around if you are able to memorize the number.

What is a Social Security number?

A Social Security number is known to be the number given to citizens of a country. It is vital because one need it if they want to get a job.

The use of Social Security is one that can give us some benefits and one can use it to get some government services. It is good that one should keep their Social Security card in the right place.

Learn more about social security number from

https://brainly.com/question/2149712


What is the device that is non-volatile sometime called external memory?

Answers

Answer:

bcause when the computer crashes and shuch the thing is fine becasue all it does is store

Explanation:

Which of the following is most often a barrier to software migration?
It's easier to continue using an out-of-date software program as long as possible.
O It's usually cheaper to upgrade software than it is to purchase a new product.
O It's difficult to find new software that is secure enough to replace the old software.
O It's not possible to keep old data when migrating to a new software program.

Answers

Answer: B: It's usually cheaper to upgrade software than it is to purchase a new product.

Explanation: I googled it lol :)

Answer:

b

Explanation:

b

Define a method pyramidVolume with double parameters baseLength, baseWidth, and pyramidHeight, that returns as a double the volume of a pyramid with a rectangular base.

Answers

Answer:

double pyramidVolume(double baseLength, double baseWidth, double pyramidHeight)

{

  return baseLength * baseWidth * pyramidHeight / 3.0;

}

write a program to Test if mold is stored in the variable word.

Answers

word = whatever value you want.

if "mold" in word:

   print("Mold is in the variable word.")

else:

   print("Mold is not in the variable word.")

Adult male heights are normally distributed with a mean of 70 inches and a standard deviation of 3 inches. The average basketball player is 79 inches tall. Approximately what percent of the adult male population is taller than the average basketball player? (2 points)

Answers

Answer:

16

Explanation:

What game is this? help mee?

Answers

Answer:

nooooooo

Explanation:

Alexis has six different pieces of jewelry to show and describe

Answers

Answer:

The answer to this question is given below in the explanation section

Explanation:

This question is not complete and the completed question is given below:

Alexis has six different pieces of jewelry to show and describe on a web page. Two are gold, and the rest are silver. Based on the principles of proximity, how would she display these pieces on her page?

She would separate each and provide some distance between them She would mix the pieces and keep them all close together She would make two columns of jewelry with an equal number of  pieces in each She would group the gold together, and the silver together

Based on the principle of proximity, the correct answer to this question is:

She would group the gold together, and the silver together.

As you know that the principle of proximity states that things that are close together appear to be more related than things that are spaced farther apart. So based on this principle she needs to make two groups gold and silver. So, based on the proximity principle, she would group the gold together, and the silver together.  

Choose the function described.
The
function deletes all items from a list.
delete
remove
clear

Answers

Answer:

clear

Explanation:

Answer:

just did the test and the answer is c clear

Explanation:

14 Convert the
following binary
numbers to decimal
0011​

Answers

Answer:

.

Explanation:

The answer to this is 3

A man is charged a fee by the city for having numerous broken cars and auto parts in his front yard. Which of the following correctly describes why the city punishes him? He has committed a crime. He is in violation of a city statute. He has violated an amendment of the U.S. Constitution. A judge has decided that he is in violation of civil law.

Answers

Answer:

Violation of city Statute

         

Answer:

B

Explanation:

If num1 and num2 are the same, print equal.

Answers

num1 = some value

num2 = some value

if num1 == num2:

   print("equal")

You just need to provide the values for the numbers. I hope this helps!

Write modified code that will generate a random number between 0 and 255 when a button is pressed and will write the number to the serial monitor as well as to the receiver Arduino.

Answers

Solution :

#include<LiquidCrystal.h>

int value;

int flag;

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup()

{

lcd.begin(16, 2);

Serial.begin(9600);

}

void loop()

{

value=digitalRead(7);

  if(value==0){

flag=1;}

  if(value==1){

flag=~flag;}

  if (flag==1){

lcd.setCursor(0,0);    

  lcd.print("number is");

lcd.setCursor(2,1);    

lcd.print(random(0, 255));

delay(1000);

}

  else{

lcd.setCursor(0,0);

lcd.print("Not Pressed");

delay(1000);

lcd.clear();}

}

With _____, rather than automation, humans are in the decision loop, with machines rapidly executing the approved tasks.

Answers

Answer:

artificial intelligence

Explanation:

Remember, the term Artificial intelligence in simple words refers to a technology that enables machines (such as computers) to make decisions, plan activities, and execute tasks.

So in a sense, with widespread usage of artificial intelligence, humans would no longer play active roles in executing tasks but the machines will; doing so rapidly.

Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integers that follow. Then, get the last value from the input, and output all integers less than or equal to that value.

Answers

lst = input().split()

lst.pop(0)

w = lst[-1]

lst.pop(-1)

newlst = [int(x) for x in lst if int(x) <= int(w)]

print(newlst)

This works for me. Best of luck.

The Fibonacci sequence is a famous sequence in mathematics. The first two elements are defined as 1, 1. Subsequent elements are defined as the sum of the preceding two elements. For example, the third element is 2 (=1+1), the fourth element is 3 (=1+2), the fifth element is 5 (=2+3), and so on.

Required;
Use a for loop to create a vector which contains the first 50 Fibonacci numbers.

Answers

Answer:

Written using C++

#include <iostream>  

#include <vector>  

using namespace std;  

int main() {  

vector<int> fibb;  

int n1 = 0;

int n2 = 1;

int temp;

for (int nm= 0; nm < 50;nm++) {

 fibb.push_back(n1);

 temp = n1 + n2;

 n1 = n2;

 n2 = temp;

}

for (int nm= 0; nm < 50;nm++) {

{

 cout<<fibb.at(nm)<<" ";

}

return 0;  

}

Explanation:

#include <iostream>  

#include <vector>  

using namespace std;  

int main() {  

This line declares the vector as integer

vector<int> fibb;  

This line initializes the first term to 0

int n1 = 0;

This line initializes the second term to 1

int n2 = 1;

This line declares a temporary variable

int temp;

The following iteration populates the vector with first 50 Fibonacci series

for (int nm= 0; nm < 50;nm++) {

This push an entry into the vector

 fibb.push_back(n1);

The following generate the next Fibonacci element

 temp = n1 + n2;

 n1 = n2;

 n2 = temp;

}

The following iteration prints the generated series

for (int nm= 0; nm < 50;nm++) {

 cout<<fibb.at(nm)<<" ";

}

return 0;  

}

What is the space complexity of the algorithm?ArithmeticSeries(list, listSize) { i = 0 arithmeticSum = 0 while (i < listSize) { arithmeticSum = arithmeticSum + list[i] i = i + 1 } return arithmeticSum}

Answers

Answer:

O(n) which is a linear space complexity

Explanation:

Space complexity is the amount of memory space needed for a program code to be executed and return results. Space complexity depends on the input space and the auxiliary space used by the algorithm.

The list or array is an integer array of 'n' items, with the memory size 4*n, which is the memory size of an integer multiplied by the number of items in the list. The listSize,  i, and arithmeticSum are all integers, the memory space is 4(3) = 12. The return statement passes the content of the arithmetic variable to another variable of space 4.

The total space complexity of the algorithm is "4n + 16" which is a linear space complexity.

Other Questions
what is the vaccine of corona virus? PLS HELP!!! I WILL GIVE THE FIRST GOOD ANSWER BRAINLIEST!!!! If you starred in a television show about your life, what would the show be called? What genre would it be? Summarize the plot of an episode. Genre examplescomedy, drama, thriller, romance,action-adventure, fantasy, superhero, soap opera,reality, game show, space adventure, Western,tragedy, etc.1 paragraph PLS BE RIGHTThe image shows a white radish, which is a seed plantWhich describes the root and stem types of this plant?fibrous root with herbaceous stemfibrous root with woody stemtaproot with herbaceous stemtaproot with woody stem Why does the first sentence turn out to be ironic?In the living room the voice-clock sang, "Tick-tock,seven o'clock, time to get up, time to get up, seveno'clock!" as if it were afraid that nobody would." Solve for x in angle bisector please What gives Congress the power to raise taxes to fund services?the Federal Reserve Bankthe Internal Revenue Servicethe Bill of Rightsthe Constitution In what way are pure competition and monopolies different?O A. One has a large number of sellers; the other has only one seller.O B. For one, profit is the motive; in the other, helping people is themotive.C. In one, services are produced; in the other, products are produced.D. For one, innovative products are produced; in the other, traditionalproducts are produced. What is the slope of the line that passes through the points (-8,-3)and(-12,-3) write your answer in the simplest form How many atoms of oxygen are in the following compound? Ba3(PO4)2 How did Islam most immediately impact women in Arabia? NEED HELP NOW WILL MARK BRAINLYeSTA. allowed them to reject marriage offersB. excluded them from paying taxesC. granted them social and economic equality with men D. permitted them to marry outside the faith Planets A and B have the same size, mass, and direction of travel, but planetA is traveling through space at half the speed of planet B. Which statementcorrectly explains the weight you would experience on each planet?A. You would weigh the same on both planets because their massesand the distance to their centers of gravity are the same.O B. You would weigh the same on both planets because your masswould adjust depending on the planet's speed.O C. You would weigh less on planet B because it is traveling twice asfast as planet A.D. You would weigh more on planet B because it is traveling twice asfast as planet A what is the value of x in the proportion 2 1/4/x = 1 1/2/3 3/5?(A) 2 2/5(B) 5 2/5(C) 8 1/10(D) 12 3/20 what is meiotic metaphase I? Find the value of the expression: 3x0 for x=2.6 Nothing to see here.Have a good thanksgiving. lf a, 3, b, 12, c are in G.P then find the value of a, b and c. plz help me AsAp!!! Question 710 ptsJohannes Gutenberg's ________could make a thousand identical copies of the samepage which reduced costs and gave the common person easier access to Renaissanceliterature and ideas.O printing pressO movable typegOink printerO copying machine What is the ratio of the number of days in the week that do not begin with the letter "T" to the number of days in the week that do begin with the letter "T"? (1 point) 0.6(x + 2) = 0.55(2x + 3)