科學計數表示

問題描述:輸入0.000005,輸出,5e-6, 輸入123.456,輸出1.23456e2 ,輸入100.00978,輸出1.0000978e2 思考:問題比較簡單,要注意小數點的移動和存在多0的情況,判斷0是否需要加上. C++代碼: #include <iostream> #include <string> using namespace std; int main(void) { stri
相關文章
相關標籤/搜索