看板 EE_DSnP 關於我們 聯絡資訊
第一題跑的結果 電腦總只顯示小數後五位 為什麼呢?? ====================== By default, the precision for cout is 6 digits. Please try to Google "setprecision C++". For this problem, try: cout << fixed << setprecision(10) << ... -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 59.121.132.222
ally01202:解決! 可是我的iterations不是199999999... 11/01 23:21
ric2k1:你多加了, 第一項 "4" 應該不算... 11/01 23:32
ally01202:還是多了2... 我出現200000002... 11/01 23:34
ric2k1:Try set accuracy = 4.0. The iteration should be 0... 11/01 23:44
DoraBoy:為什麼我打出 cout << fixed << setprecision(10) << 會 11/01 23:45
DoraBoy:出現`setprecision' undeclared (first use this function 11/01 23:46
ally01202:include<iomanip> 11/01 23:49
ilway25:#include <iomanip> 11/01 23:49
ilway25:囧慢了一步= = 11/01 23:50