Toggle navigation
Home
Latest pastes
FAQ
Random
BitBin is shutting down!
Register
Login
spoj BCFACT
SUBMITTED BY:
Guest
DATE:
Feb. 16, 2014, 9:02 a.m.
FORMAT:
C++
SIZE:
483 Bytes
Raw
Download
Tweet
HITS:
927
Go to comments
Report
//Haha TTpro
//BCFACT
//http://www.spoj.com/PTIT/problems/BCFACT/
#include
<iostream>
using
namespace
std
;
long
long
int
giaithua
(
int
a
);
int
main
()
{
int
a
;
long
long
int
s
;
while
(
true
)
{
cin
>>
a
;
s
=
giaithua
(
a
);
cout
<<
s
<<
endl
;
}
}
long
long
int
giaithua
(
int
a
)
{
long
long
int
s
=
1
;
int
i
;
for
(
i
=
1
;
i
<=
a
;
i
++
)
{
s
=
s
*
i
;
}
return
s
;
}
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus