当前位置:网站首页>7-6 mixed type data format input
7-6 mixed type data format input
2022-07-03 14:14:00 【Big fish】
This question requires the preparation of procedures , Read in floating-point numbers in order 1、 Integers 、 character 、 Floating point numbers 2, And then according to the character 、 Integers 、 Floating point numbers 1、 Floating point numbers 2 Sequential output .
Input format :
Enter floating-point numbers in order in one line 1、 Integers 、 character 、 Floating point numbers 2, In the meantime 1 Space separation .
Output format :
In a line by character 、 Integers 、 Floating point numbers 1、 Floating point numbers 2 Sequential output , Floating point numbers are reserved after the decimal point 2 position .
sample input :
2.12 88 c 4.7
sample output :
c 88 2.12 4.70
c The language code is as follows :
#include<stdio.h>
int main()
{
double a;// Start floating point assignment float Type causes errors , Change it to double Two decimal places can be reserved after type
int b;
char e;
double d;
scanf("%lf %d %c %lf",&a,&b,&e,&d);// The input floating-point type is %lf type
printf("%c %d %.2f %.2f",e,b,a,d);
return 0;
}
边栏推荐
- Eight sorts
- Scroll detection, so that the content in the lower right corner is not displayed at the top of the page, but is displayed as the mouse slides
- 7-9 find a small ball with a balance
- Exercise 6-6 use a function to output an integer in reverse order
- QT learning 24 layout manager (III)
- Exercise 9-3 plane vector addition
- Canvas utility library fabric JS user manual
- 关于回溯问题中的排列问题的思考(LeetCode46题与47题)
- Nucleic acid modified metal organic framework drug carrier | pcn-223 metal organic framework encapsulated ad adamantane | zif-8 encapsulated adriamycin (DOX)
- Toast UI editor (editor allows you to edit your markup document using text or WYSIWYG, with syntax highlighting, scrolling synchronization, real-time preview and chart functions.)
猜你喜欢
JS Part 2
Exercise 6-2 using functions to sum special A-string sequences
Exercise 9-1 time conversion
7-9 find a small ball with a balance
Programmable logic device software testing
[clean up the extraordinary image of Disk C]
7-8 overspeed judgment
泰凌冲刺科创板:拟募资13亿 国家大基金与小米长江是股东
[email protected] Nanoparticles) | nano metal organic framework carry"/>
Metal organic framework material zif-8 containing curcumin( [email protected] Nanoparticles) | nano metal organic framework carry
信创产业现状、分析与预测
随机推荐
JS Part 2
C language,%d% Difference between 2D%2d%02d
JS input number and standard digit number are compared. The problem of adding 0 to 0
js . Find the first palindrome string in the array
PCB中常用快捷键
Redis:Redis的数据结构、key的操作命令
Redis:字符串類型數據的操作命令
Similarities and differences of sessionstorage, localstorage and cookies
Exercise 8-2 calculate the sum and difference of two numbers
protobuf与grpc
Raft 协议
QT learning 21 standard dialog box in QT (Part 2)
信创产业现状、分析与预测
JS continues to explore...
“又土又穷”的草根高校,凭什么被称为“东北小清华”?
TS code automatically generates JS
Common plug-ins for vite project development
Configure stylelint
Exercise 9-3 plane vector addition
Message subscription and publishing