Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in c++ please Program 1. Write a program that prints out Pl as a type double and a type float EXACTLY as shown below. Your

image text in transcribed
image text in transcribed
in c++ please
Program 1. Write a program that prints out Pl 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 PID = 3.14159256359; float PL F = 3.14159256359; DOUBLE FLOAT ----3.1--- --3.1 -------3.14--------- -3.14 -------3.142------ -3.142 ---3.1416-- -3.1416 ----3.14159--- -3.14159 -------3.141593-------3.141593 -------3.1415926------3.1415925 -------3.14159256-----3.14159250, -------3.141592564----3.141592503 ----3.1415925636---3.1415925026 Press any key to continue

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro Database Migration To Azure Data Modernization For The Enterprise

Authors: Kevin Kline, Denis McDowell, Dustin Dorsey, Matt Gordon

1st Edition

1484282299, 978-1484282298

More Books

Students also viewed these Databases questions

Question

Explain the importance of nonverbal messages.

Answered: 1 week ago

Question

Describe the advantages of effective listening.

Answered: 1 week ago

Question

Prepare an employment application.

Answered: 1 week ago