当前位置:网站首页>小数,指数
小数,指数
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;
}
边栏推荐
- Programmer turns direction
- SAIC Maxus officially released its new brand "mifa", and its flagship product mifa 9 was officially unveiled!
- leetcode:6110. The number of incremental paths in the grid graph [DFS + cache]
- LVGL 8.2 Draw label with gradient color
- Korean AI team plagiarizes shock academia! One tutor with 51 students, or plagiarism recidivist
- (1) The standard of performance tuning and the correct posture for tuning - if you have performance problems, go to the heapdump performance community!
- 开发中常见问题总结
- Analysis of nearly 100 million dollars stolen and horizon cross chain bridge attacked
- C language small commodity management system
- LVGL 8.2 Sorting a List using up and down buttons
猜你喜欢
LVGL 8.2 Draw label with gradient color
如何搭建一支搞垮公司的技术团队?
Leecode learning notes - Joseph problem
LVGL 8.2 text shadow
开发中常见问题总结
92. (cesium chapter) cesium building layering
Kubernets Pod 存在 Finalizers 一直处于 Terminating 状态
Data Lake (13): spark and iceberg integrate DDL operations
Implementation of macro instruction of first-order RC low-pass filter in signal processing (easy touch screen)
Ffprobe common commands
随机推荐
金额计算用 BigDecimal 就万无一失了?看看这五个坑吧~~
Implementation of macro instruction of first-order RC low-pass filter in signal processing (easy touch screen)
Ffmpeg Visual Studio development (IV): audio decoding
Gin integrated Alipay payment
PLC模拟量输入 模拟量转换FC S_ITR (CODESYS平台)
A collection of classic papers on convolutional neural networks (deep learning classification)
音视频技术开发周刊 | 252
Combined with case: the usage of the lowest API (processfunction) in Flink framework
Redis publish and subscribe
openresty 限流
现代控制理论入门+理解
LVGL 8.2 text shadow
Is it safe to open an account online for stock speculation? Will you be cheated.
Exploration and practice of eventbridge in the field of SaaS enterprise integration
Guitar Pro 8win10 latest guitar learning / score / creation
Data Lake (13): spark and iceberg integrate DDL operations
LVGL 8.2 Menu
Classify boost libraries by function
信号处理之一阶RC低通滤波器宏指令实现(繁易触摸屏)
关于FPGA底层资源的细节问题