E表示法 如:+3.4E+9意思:3.4的九次方
+号可以省去 e大小写都可以
include<climits>
float a=12.2;
double b=24.3;
long double c=21321.2;
cout << FLT_MAX<<endl;
cout << FLT_MIN <<endl;
float 运算类型。
E表示法 如:+3.4E+9意思:3.4的九次方
+号可以省去 e大小写都可以
include<climits>
float a=12.2;
double b=24.3;
long double c=21321.2;
cout << FLT_MAX<<endl;
cout << FLT_MIN <<endl;
float 运算类型。
E表示法前面可以加 加号和减号
浮点类型 float double long doudle
cout<<FLT_MAX<< endl;
cout<<FLT_MIN << endl;
E表示法
3.4E9 = 3.4 *10的9次方
3.4E-9 = 3.4 /10的9次方
浮点类型:
小数类型, 12.34 87545.12 9.0 0.0012
E表示法 2.33e+8 2.33e8 2.33的10的8次方
8.21e-3 8.21的10的-3次方
-12.2e10 -12.2的10的10次方
3个定义浮点类型的关键字
float double long double
float已经够用,掌握这一个就可以
float
double
long double
浮点类型 小数
浮点类型即小数类型
小数即浮点数
E表示法 E+数字 代表10的几次方
例如
E9 代表10的9次方
E-9 代表10的负9次方
3.4E5 = 3.4*10的5次方
PS: E 大小写皆可
浮点类型有 float double long double
大小依次递增
float 为正负10的38次方之间
浮点类型就是小数类型
+表示正的 -表示负数
E表示法
正好是可以省略 负的不可以
浮点类型有三种 float a=12.2
double b= 24.3
long doubie c=21321.2
重点整数类型 INT
和float类型
float 浮点数
#include <iostream>
#include <climits>
using namespace std;
int main()
{
// 12.34 82394.34 9.0 0.00034
// E表示法
//+3.4E+9 // 3.4E9 3.4*1000000000
//+3.4E-9 // 3.4E-9 3.4/1000000000
float a = 12.2;
double b =24.3;
long double c = 21321.2;
cout << FLT_MAX << endl; // 输出:3.40282e+38
cout << FLT_MIN << endl; // 输出:1.17549e-38
int t;
cin >> t;
return 0;
}
浮点类型(基本类型)
浮点数:12.34 9034.3 0.000034 9.0
E表示法
+5.38E+18
2.33e+8 2.33e8 8.21E-3 -12.2e10
浮点类型 float double 和 long double
整型和浮点型都是算数类型 也是基本类型
#include "stdafx.h"
#include<iostream>
using namesprace std;
3.4E+9//3.4*10^9;
3.4E-9//3.4/10^9;
float<double<long double;
#include ''stdafx.h'
#include <iostream>
using namespace std;
int main()
{
+3.4E9
int t;
cin>>t;
float a=12.2;
double b=23.4;
long double c=231.3;
cout<<a;
return 0;
}