当前位置:网站首页>小数,指数
小数,指数
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;
}
边栏推荐
- 金额计算用 BigDecimal 就万无一失了?看看这五个坑吧~~
- Flutter reports an error no mediaquery widget ancestor found
- PLC Analog input analog conversion FC s_ ITR (CoDeSys platform)
- 【学习笔记】拟阵
- 如何配和弦
- Ranking list of databases in July: mongodb and Oracle scores fell the most
- 如何搭建一支搞垮公司的技术团队?
- When synchronized encounters this thing, there is a big hole, pay attention!
- Guitar Pro 8win10最新版吉他学习 / 打谱 / 创作
- 炒股网上开户安全吗?会不会被骗。
猜你喜欢

Five minutes of machine learning every day: why do we need to normalize the characteristics of numerical types?

LVGL 8.2 text shadow

Data Lake (13): spark and iceberg integrate DDL operations

Redis 解决事务冲突之乐观锁和悲观锁

Opencv learning notes - linear filtering: box filtering, mean filtering, Gaussian filtering

都在说DevOps,你真正了解它吗?

Five minutes per day machine learning: use gradient descent to complete the fitting of multi feature linear regression model

flutter 报错 No MediaQuery widget ancestor found.

Xcode abnormal pictures cause IPA packet size problems

numpy笔记
随机推荐
SAIC Maxus officially released its new brand "mifa", and its flagship product mifa 9 was officially unveiled!
LVGL 8.2 Menu
内存管理总结
How to build a technical team that will bring down the company?
为什么国产手机用户换下一部手机时,都选择了iPhone?
The performance of major mainstream programming languages is PK, and the results are unexpected
flutter 报错 No MediaQuery widget ancestor found.
C language set operation
Helix Swarm中文包发布,Perforce进一步提升中国用户体验
Why do domestic mobile phone users choose iPhone when changing a mobile phone?
各大主流编程语言性能PK,结果出乎意料
深度学习 神经网络的优化方法
Korean AI team plagiarizes shock academia! One tutor with 51 students, or plagiarism recidivist
%f格式符
Docker compose public network deployment redis sentinel mode
Guitar Pro 8win10最新版吉他学习 / 打谱 / 创作
es6模块化
韩国AI团队抄袭震动学界!1个导师带51个学生,还是抄袭惯犯
Kubernets Pod 存在 Finalizers 一直处于 Terminating 状态
LVGL 8.2 Sorting a List using up and down buttons