[問題] 新手的小問題
#include <iostream>
using std::cin ;
using std::cout ;
using std::endl ;
int main()
{
int x ,y;
int i (i>0) ;
cout <<"input a integer :" ;
cin >> x;
for (i=1 ;i<=x; i++)
y= i*(i-1) ;
cout << "the value :" << y;
system ("pause") ;
}
N!=N*(N-1)*(N-2)*.......
問題在於 3!以上答案就錯誤了 請問一下哪裡需要修改
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 83.31.235.64
→
08/10 02:44, , 1F
08/10 02:44, 1F
→
08/10 02:50, , 2F
08/10 02:50, 2F
→
08/10 08:19, , 3F
08/10 08:19, 3F
推
08/10 12:31, , 4F
08/10 12:31, 4F
→
08/10 12:31, , 5F
08/10 12:31, 5F
→
08/10 12:45, , 6F
08/10 12:45, 6F
討論串 (同標題文章)
完整討論串 (本文為第 1 之 3 篇):
1
6
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章