当前位置:网站首页>小数,指数
小数,指数
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;
}
边栏推荐
- Explain of SQL optimization
- [MySQL from introduction to proficiency] [advanced chapter] (IV) MySQL permission management and control
- First experience of ViewModel
- Korean AI team plagiarizes shock academia! One tutor with 51 students, or plagiarism recidivist
- Respect others' behavior
- Expose Ali's salary and position level
- LVGL 8.2 Line wrap, recoloring and scrolling
- 如何搭建一支搞垮公司的技术团队?
- C language small commodity management system
- 03 storage system
猜你喜欢

程序员自曝接私活:10个月时间接了30多个单子,纯收入40万

内存管理总结

Comment configurer un accord

Xcode abnormal pictures cause IPA packet size problems

Alcohol driving monitoring system based on stm32+ Huawei cloud IOT design

Luo Gu - some interesting questions

Luo Gu - some interesting questions 2
![[local differential privacy and random response code implementation] differential privacy code implementation series (13)](/img/fe/f6a13dcf31ac67633ee5a59d95149d.jpg)
[local differential privacy and random response code implementation] differential privacy code implementation series (13)

03 storage system

智能客服赛道:网易七鱼、微洱科技打法迥异
随机推荐
PLC模拟量输入 模拟量转换FC S_ITR (CODESYS平台)
Graduation season - personal summary
【C语言】指针笔试题
Implementation of macro instruction of first-order RC low-pass filter in signal processing (easy touch screen)
C language programming
5g TV cannot become a competitive advantage, and video resources become the last weapon of China's Radio and television
How to handle exceptions in multithreading?
%f格式符
Details of FPGA underlying resources
How to match chords
LVGL 8.2 LED
Explain of SQL optimization
Summary of common problems in development
Docker compose public network deployment redis sentinel mode
(1) The standard of performance tuning and the correct posture for tuning - if you have performance problems, go to the heapdump performance community!
C language set operation
On the implementation plan of MySQL explain
Leecode learning notes - Joseph problem
LVGL 8.2 Sorting a List using up and down buttons
Kubernets pod exists finalizers are always in terminating state