Gitiles
Code Review
Sign In
gerrit.openbmc.org
/
openbmc
/
phosphor-host-ipmid
/
8171970a5ecfa1aa5b8b80b4418bf0f9fd8304e8
/
.
/
sample.cpp
blob: 451c6c4bac1199e666e9ad1bc325ad8be3ec2341 [
file
] [
log
] [
blame
]
Matthew Barth
00b1e5b
2016-09-09 12:15:46 -0500
[
diff
] [
blame
]
1
#include
<sample.h>
2
3
int
Factorial
(
int
n
)
4
{
5
int
result
=
1
;
6
for
(
int
i
=
1
;
i
<=
n
;
i
++)
7
{
8
result
*=
i
;
9
}
10
return
result
;
11
}