当前位置:网站首页>小数,指数
小数,指数
2022-07-04 13:32:00 【Zaltana】
输出3.1415926、12345678.123456789的小数、 指数形式。
格式.
输入格式:无
输出格式:输出为实型,空格分隔
样例
输入:无
输出: 3.141593 3.141593e+000
12345678.123457 1.234568e+007
#include<bits/stdc++.h>
using namespace std;
double a = 3.1415926 ,b=12345678.123456789 ;
void solve(double a){
printf("%.6lf",a) ;
int i=0;
while (a > 10) {
a =a / 10.0;
i++;
}
printf(" %.6lfe+",a);
cout << setw(3) << setfill('0')<< i;
return ;
}
int main(){
solve(a);
cout << endl;
solve(b);
return 0;
}
边栏推荐
- What are the concepts of union, intersection, difference and complement?
- LVGL 8.2 Line
- The performance of major mainstream programming languages is PK, and the results are unexpected
- TechSmith Camtasia studio 2022.0.2 screen recording software
- 自动控制原理快速入门+理解
- flutter 报错 No MediaQuery widget ancestor found.
- They are all talking about Devops. Do you really understand it?
- 金额计算用 BigDecimal 就万无一失了?看看这五个坑吧~~
- %f格式符
- Yyds dry goods inventory # solve the real problem of famous enterprises: continuous maximum sum
猜你喜欢
Combined with case: the usage of the lowest API (processfunction) in Flink framework
产品好不好,谁说了算?Sonar提出分析的性能指标,帮助您轻松判断产品性能及表现
Kubernets Pod 存在 Finalizers 一直处于 Terminating 状态
UFO: Microsoft scholars have proposed a unified transformer for visual language representation learning to achieve SOTA performance on multiple multimodal tasks
Analysis of nearly 100 million dollars stolen and horizon cross chain bridge attacked
Dialogue with ye Yanxiu, senior consultant of Longzhi and atlassian certification expert: where should Chinese users go when atlassian products enter the post server era?
Memory management summary
自动控制原理快速入门+理解
LeetCode 1200 最小绝对差[排序] HERODING的LeetCode之路
How to match chords
随机推荐
Five minutes per day machine learning: use gradient descent to complete the fitting of multi feature linear regression model
LeetCode 1200 最小绝对差[排序] HERODING的LeetCode之路
Who the final say whether the product is good or not? Sonar puts forward performance indicators for analysis to help you easily judge product performance and performance
Korean AI team plagiarizes shock academia! One tutor with 51 students, or plagiarism recidivist
深度学习7 Transformer系列实例分割Mask2Former
[algorithm leetcode] interview question 04.03 Specific depth node linked list (Multilingual Implementation)
A collection of classic papers on convolutional neural networks (deep learning classification)
remount of the / superblock failed: Permission denied
音视频技术开发周刊 | 252
leetcode:6110. The number of incremental paths in the grid graph [DFS + cache]
LVLG 8.2 circular scrolling animation of a label
flutter 报错 No MediaQuery widget ancestor found.
浮点数如何与0进行比较?
[cloud native] how can I compete with this database?
[C language] Pointer written test questions
内存管理总结
Luo Gu - some interesting questions
Memory management summary
韩国AI团队抄袭震动学界!1个导师带51个学生,还是抄袭惯犯
智能客服赛道:网易七鱼、微洱科技打法迥异