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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 22:00, luisanavarrogarcia
Which of the following statements correctly identifies a problem with sanitization methods? a. methods are not available to remove data ensuring that unauthorized personnel cannot retrieve data. b. even fully incinerated media can offer extractable data. c. personnel can perform sanitization steps improperly. d. stored data is physically etched into the media.
Answers: 1
image
Computers and Technology, 22.06.2019 11:00, terriblexsiren
You receive an email from an impressive-sounding stranger, professor alexander rothschild renard iii, president of the american institute for scientific political statesmen. he urges you to vote for his presidential candidate choice. this social media red flag is known as
Answers: 1
image
Computers and Technology, 22.06.2019 19:00, trintrin227
In he example code, what does the title attribute create? a tool tip an element a source a markup
Answers: 1
image
Computers and Technology, 22.06.2019 23:50, Crull5999
List a few alternative options and input and output over the standerd keyboard and monitor. explain their functioning in details.
Answers: 2
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 in other subjects: