- Hands-On Object:Oriented Programming with C#
- Raihan Taher
- 99字
- 2021-07-02 12:44:34
Real
Real values are sequences of digits with a positive or negative sign, like integers. This also makes it possible to specify fraction values:
float realNumber = 12.5f;
realNumber = 1.25e+1f;
double realdNumber = 12.5;
As you can see, the literal in the last line, 12.5, is double by default, hence it needed to be assigned to a double variable, while the first two lines specify the literal in float types. You can also specify d or D as a suffix to define a double, like f or F for float and m for decimal.
推薦閱讀
- Android 9 Development Cookbook(Third Edition)
- OpenNI Cookbook
- C#程序設計
- 琢石成器:Windows環境下32位匯編語言程序設計
- SQL經典實例(第2版)
- Express Web Application Development
- 21天學通C++(第5版)
- Oracle數據庫編程經典300例
- Python計算機視覺和自然語言處理
- Python GUI Programming Cookbook(Second Edition)
- 零基礎學Java第2版
- R語言數據分析從入門到實戰
- Azure for Architects
- R語言與網站分析
- Python網絡爬蟲從入門到實踐