精華區beta NTUBIME101HW 關於我們 聯絡資訊
#include <iostream> using namespace std; double re(double); int main() { double e,x=1.0; for(;x<=10;x++) { e=re(x); cout<<e<<endl; } system("pause"); return 0; } double re(double x) { double e=1.0,L=1.0; for(int i=1;i<20;i++) { L=L*x/i; e+=L; } return e; } -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.241.88 ※ 編輯: vincent79715 來自: 140.112.241.88 (12/08 00:42)