当前位置:网站首页>小数,指数
小数,指数
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;
}
边栏推荐
- LVGL 8.2 text shadow
- ES6 modularization
- PLC Analog input analog conversion FC s_ ITR (CoDeSys platform)
- [algorithm leetcode] interview question 04.03 Specific depth node linked list (Multilingual Implementation)
- LVGL 8.2 Menu
- C language book rental management system
- Xcode abnormal pictures cause IPA packet size problems
- 浮点数如何与0进行比较?
- Korean AI team plagiarizes shock academia! One tutor with 51 students, or plagiarism recidivist
- 找数字
猜你喜欢

内存管理总结

Guitar Pro 8win10 latest guitar learning / score / creation

Xcode abnormal pictures cause IPA packet size problems

深度学习 神经网络的优化方法

对话龙智高级咨询顾问、Atlassian认证专家叶燕秀:Atlassian产品进入后Server时代,中国用户应当何去何从?

A keepalived high availability accident made me learn it again

LVGL 8.2 Line wrap, recoloring and scrolling

自动控制原理快速入门+理解

92. (cesium chapter) cesium building layering

Introduction to modern control theory + understanding
随机推荐
Programmer turns direction
Quick introduction to automatic control principle + understanding
Redis 发布和订阅
C language set operation
Partial modification - progressive development
How to match chords
Five minutes of machine learning every day: how to use matrix to represent the sample data of multiple characteristic variables?
Kubernets Pod 存在 Finalizers 一直处于 Terminating 状态
UFO:微软学者提出视觉语言表征学习的统一Transformer,在多个多模态任务上达到SOTA性能!...
Leetcode 1200 minimum absolute difference [sort] The Path of leetcode for heroding
LVGL 8.2 Sorting a List using up and down buttons
Graduation season - personal summary
局部修改-渐进型开发
Gin integrated Alipay payment
LeetCode 1200 最小絕對差[排序] HERODING的LeetCode之路
TechSmith Camtasia studio 2022.0.2 screen recording software
LVGL 8.2 Sorting a List using up and down buttons
智能客服赛道:网易七鱼、微洱科技打法迥异
(1) The standard of performance tuning and the correct posture for tuning - if you have performance problems, go to the heapdump performance community!
开发中常见问题总结