当前位置:网站首页>Decimal, exponential
Decimal, exponential
2022-07-04 15:04:00 【Zaltana】
Output 3.1415926、12345678.123456789 Decimals of 、 Exponential form .
Format .
Input format : nothing
Output format : Output is real , The blank space to separate
Examples
Input : nothing
Output : 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;
}
边栏推荐
- remount of the / superblock failed: Permission denied
- 【学习笔记】拟阵
- Halo effect - who says that those with light on their heads are heroes
- A keepalived high availability accident made me learn it again
- LVLG 8.2 circular scrolling animation of a label
- 重排数组
- First experience of ViewModel
- Analysis of nearly 100 million dollars stolen and horizon cross chain bridge attacked
- Redis 解决事务冲突之乐观锁和悲观锁
- TechSmith Camtasia studio 2022.0.2 screen recording software
猜你喜欢
Redis 发布和订阅
Implementation of macro instruction of first-order RC low-pass filter in signal processing (easy touch screen)
Kubernets pod exists finalizers are always in terminating state
各大主流编程语言性能PK,结果出乎意料
如何配和弦
SAIC Maxus officially released its new brand "mifa", and its flagship product mifa 9 was officially unveiled!
Combined with case: the usage of the lowest API (processfunction) in Flink framework
92. (cesium chapter) cesium building layering
When synchronized encounters this thing, there is a big hole, pay attention!
信号处理之一阶RC低通滤波器宏指令实现(繁易触摸屏)
随机推荐
LVGL 8.2 LED
openresty 重定向
C language book rental management system
[local differential privacy and random response code implementation] differential privacy code implementation series (13)
Programmer turns direction
%f格式符
Leecode learning notes - Joseph problem
大神详解开源 BUFF 增益攻略丨直播
Ffmpeg Visual Studio development (IV): audio decoding
Comment configurer un accord
如何配和弦
各大主流编程语言性能PK,结果出乎意料
A keepalived high availability accident made me learn it again
Redis 解决事务冲突之乐观锁和悲观锁
《opencv学习笔记》-- 线性滤波:方框滤波、均值滤波、高斯滤波
输入宽度!
深度学习7 Transformer系列实例分割Mask2Former
Ffprobe common commands
Ranking list of databases in July: mongodb and Oracle scores fell the most
Is BigDecimal safe to calculate the amount? Look at these five pits~~