Skip to content

Instantly share code, notes, and snippets.

Created April 12, 2009 04:15
Show Gist options
  • Save anonymous/93861 to your computer and use it in GitHub Desktop.
Save anonymous/93861 to your computer and use it in GitHub Desktop.
#include <iostream>
using namespace std;
int main(int argc,int *argv[])
{
long long int i,n,result=1;
long long int temp[1000];
while(cin>>n){
for(i=1;i<=n;i++)
result*=i;
temp=result; //將計算結果存入temp中...會出現錯誤
cout<<temp[0]<<endl; //想個別將每位數字存入temp[0],temp[1].....
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment