Created
April 12, 2009 04:15
-
-
Save anonymous/93861 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #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