当前位置:网站首页>小数,指数
小数,指数
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;
}
边栏推荐
- The performance of major mainstream programming languages is PK, and the results are unexpected
- Five minutes per day machine learning: use gradient descent to complete the fitting of multi feature linear regression model
- 深度学习 网络正则化
- 阿里被裁员工,找工作第N天,猎头又传来噩耗...
- Partial modification - progressive development
- LVGL 8.2 Sorting a List using up and down buttons
- 如何配和弦
- On the implementation plan of MySQL explain
- Ranking list of databases in July: mongodb and Oracle scores fell the most
- Ffprobe common commands
猜你喜欢
LVGL 8.2 text shadow
UFO: Microsoft scholars have proposed a unified transformer for visual language representation learning to achieve SOTA performance on multiple multimodal tasks
5G电视难成竞争优势,视频资源成中国广电最后武器
Wt588f02b-8s (c006_03) single chip voice IC scheme enables smart doorbell design to reduce cost and increase efficiency
Helix swarm Chinese package is released, and perforce further improves the user experience in China
Programmers exposed that they took private jobs: they took more than 30 orders in 10 months, with a net income of 400000
自动控制原理快速入门+理解
Five minutes per day machine learning: use gradient descent to complete the fitting of multi feature linear regression model
Why do domestic mobile phone users choose iPhone when changing a mobile phone?
Helix Swarm中文包发布,Perforce进一步提升中国用户体验
随机推荐
Korean AI team plagiarizes shock academia! One tutor with 51 students, or plagiarism recidivist
The performance of major mainstream programming languages is PK, and the results are unexpected
Flutter reports an error no mediaquery widget ancestor found
函数计算异步任务能力介绍 - 任务触发去重
Helix Swarm中文包发布,Perforce进一步提升中国用户体验
(1) The standard of performance tuning and the correct posture for tuning - if you have performance problems, go to the heapdump performance community!
LVGL 8.2 Line wrap, recoloring and scrolling
Alcohol driving monitoring system based on stm32+ Huawei cloud IOT design
Programmers exposed that they took private jobs: they took more than 30 orders in 10 months, with a net income of 400000
LVGL 8.2 Sorting a List using up and down buttons
关于FPGA底层资源的细节问题
LVGL 8.2 Line
remount of the / superblock failed: Permission denied
深度学习 网络正则化
Kubernets Pod 存在 Finalizers 一直处于 Terminating 状态
C language book rental management system
openresty 限流
How to handle exceptions in multithreading?
Node mongodb installation
LVGL 8.2 keyboard