OpenJudge 06:Space separated output

Description

Read a character, an integer, a single precision floating point number, a double - precision floating point number, and then output them in order, and require a space between them. 6 decimal numbers are retained when the output floating point.

Input

There are four lines in total:
The first line is a character;
The second line is an integer;
The third line is a single precision floating point number;
The fourth line is a dual - precision floating point number.

OUTPUT

Output character, integer, single - precision floating point number and dual - precision floating point number, separate spaces between spaces.

Input Sample

A
12
2.3
3.2

OUTPUT SAMPLE

A 12 2.300000 3.200000

source

Exercise (2-4)

idea

Use four different types of variables.

Answer

CPP

include

include

using namespace std;
int Main ()
{{
int a;
Float B;
char c;
Double d;
cin >> c >> a >> b >> d;
Printf (" %c %d %f %f", c, a, b, d);
Return 0;
}

Result

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

[http://noi.openjudge.cn/ch0101/06/.

OpenJudge 06:Space separated output

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

Author
Hsukqi Lee
Posted on

2022-02-20

Edited on

2022-08-04

Licensed under

CC BY-NC-ND 4.0

# Programing  Cpp  OpenJudge  NOI  NOIP

Comments

Name
Mail
Site
None yet