看板 NTUEE107HW 關於我們 聯絡資訊
這是我想的方法 可是好像到30!左右就不準了 到34!就變0了 這是什麼原因呢 要如何改善 謝謝 #include<iostream> using std::cin; using std::cout; using std::endl; int main() { long result = 1; long j; cout << "enter integer\n"; cin >> j; for (long i = 1; i <= j; i++ ) result = result * i; cout << j << "! is " << result << endl; return 0; } -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.250.230