subject

In C++ write a program that prints out PI as a type double and a type float EXACTLY as shown below. Your program should have ONE cout statement within a loop which alters the width and precision each time through the loop. Do not write 10 separate cout statements for this problem. Show the output in a table that increases the precision from 1 to 10 as shown below. Use dash ('-') as the fill character. Note the differences as the precision gets larger. Use the following two variables for PI.

double PI_D = 3.14159256359;
float PI_F = 3.14159256359;

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:00
What is added to the < meta > tag to describe the encoding type?
Answers: 2
question
Computers and Technology, 22.06.2019 06:00
Which of the following is a way that advancements in technology improve humans' ability to measure air quality and protect human health? a. air quality data gathered by new instruments can be used to reduce exposure to pollutants. b. new technologies enable natural and human-made pollution sources to be located and monitored. c. air quality data gathered by new instruments can be used to predict trends in pollution over time. d. new technologies allow governments to make informed decisions about the regulation of pollution. (choose more than one)
Answers: 2
question
Computers and Technology, 23.06.2019 09:00
Which best describes the role or restriction enzymes in the analysis of edna a. to break dna into fragments that vary in size so they can be sorted and analyzed b. to amplify small amounts of dna and generate large amounts of dna for analysis c. to purify samples of dna obtained from the environment so they can be analyzed d. to sort different sizes of dna fragments into a banding pattern that can be analyzed
Answers: 1
question
Computers and Technology, 24.06.2019 03:30
Explain the importance of html in web page designing in 20 sentences..
Answers: 1
You know the right answer?
In C++ write a program that prints out PI as a type double and a type float EXACTLY as shown below....
Questions
question
Mathematics, 04.10.2020 14:01
question
Mathematics, 04.10.2020 14:01
question
Physics, 04.10.2020 14:01
question
History, 04.10.2020 14:01
question
Mathematics, 04.10.2020 14:01
question
Mathematics, 04.10.2020 14:01
Questions on the website: 13722362