OpenJudge 05:Output floating-point numbers with 12 decimal places

Description

Read a dual - precision floating point, keep 12 decimal numbers, and output this floating point number.

Input

There is only one line, a double - precision floating point number.

OUTPUT

There is only one line, retaining the floating point number of 12 decimals.

Input Sample

3.1415926535798932

OUTPUT SAMPLE

3.141592653580

source

Exercise (2-3)

idea

Format output with Printf.

Answer

CPP

include

include

using namespace std;
int Main ()
{{
double a;
cin >> a;
Printf ("%1.12F", a);
Return 0;
}

Result

Used Memory: 200KB
Run time: 10ms
Language: G ++
Submit time: 2019-03-24 09:06:16

[http://noi.openjudge.cn/ch0101/05/>; [1]

OpenJudge 05:Output floating-point numbers with 12 decimal places

https://blog.tsinbei.com/en/archives/195/

Author
Hsukqi Lee
Posted on

2022-02-19

Edited on

2022-08-04

Licensed under

CC BY-NC-ND 4.0

# Programing  Cpp  OpenJudge  NOI  NOIP

Comments

Name
Mail
Site
None yet