skip to main
|
skip to sidebar
Kai's blog
Thursday, April 15, 2010
Output!
#include
using namespace std;
int fact(int n){
if(n == 1){
return 1;
}
else{
return fact(n-1)*n;
}
}
int main(){
cout<<
fact(6)
return 0;
}
for this program's output, you can see it as
((((((1)*2)*3)*4)*5)*6)=720
.
0 comments:
Post a Comment
Older Post
Home
Subscribe to:
Post Comments (Atom)
Followers
Blog Archive
▼
2010
(12)
▼
April
(4)
Output!
Commend line arguments!
Difference between public, private, protected inhe...
The try, catch, and throw Statements
►
March
(4)
linklist!
Queue's Operations from the C++ Standard Template ...
va_list,va_start, va_arg, and va_end
Structure VS union
►
February
(3)
Key value of MAC
Some IRC Commands
Something of first IRC meeting!
►
January
(1)
How to create a new project on Visual Studio 2008
►
2009
(1)
►
September
(1)
My first OOP344 blog!
About Me
Kai
View my complete profile
0 comments:
Post a Comment