当前位置:网站首页>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;
}
边栏推荐
- Redis: redis data structure and key operation commands
- Raft agreement
- 消息订阅与发布
- MIL-100( Fe) 包裹小分子阿司匹林形成[email protected](Fe)|甘草次酸修饰金属有机框架材料UiO-66-NH2(简称UiO-66-NH2-GA)
- QT learning 22 layout manager (I)
- 好看、好用、强大的手写笔记软件综合评测:Notability、GoodNotes、MarginNote、随手写、Notes Writers、CollaNote、CollaNote、Prodrafts、Noteshelf、FlowUs、OneNote、苹果备忘录
- Although not necessarily the best, it must be the hardest!
- 牛客网:过河卒
- 交联环糊精金属有机骨架负载甲氨蝶呤缓释微粒|金属-有机多孔材料UiO-66负载黄酮苷类药物|齐岳
- Webpage connection database ~ simple implementation of addition, deletion, modification and query complete code
猜你喜欢
7-11 calculation of residential water charges by sections
Redis: redis data structure and key operation commands
556. 下一个更大元素 III
Understanding of closures
[clean up the extraordinary image of Disk C]
【吉林大学】考研初试复试资料分享
protobuf与grpc
FPGA test method takes mentor tool as an example
TS code automatically generates JS
allegro,orcad, net alias,port,off-page connector之间的异同点和如何选取
随机推荐
JS Part 2
Too many files with unapproved license
Although not necessarily the best, it must be the hardest!
Message subscription and publishing
[Jilin University] information sharing of postgraduate entrance examination and re examination
交联环糊精金属有机骨架负载甲氨蝶呤缓释微粒|金属-有机多孔材料UiO-66负载黄酮苷类药物|齐岳
Exercise 10-1 calculate the sum of 1 to n using recursive functions
JVM garbage collector
Installation impression notes
Fabric. JS document
jvm-类加载
JS first summary
concat和concat_ws()区别及group_concat()和repeat()函数的使用
[combinatorics] permutation and combination (examples of combinatorial number of multiple sets | three counting models | selection problem | combinatorial problem of multiple sets | nonnegative intege
7-7 12-24 hour system
Example analysis of QT learning 18 login dialog box
The small project (servlet+jsp+mysql+el+jstl) completes a servlet with login function, with the operation of adding, deleting, modifying and querying. Realize login authentication, prevent illegal log
etcd集群权限管理和账号密码使用
QT learning 25 layout manager (4)
Exercise 8-7 string sorting