Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
#898 SumFactCif
Lucian_Adrian
Feb 12th, 2022
52
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
text
0.24 KB
| None
|
0
0
raw
download
clone
embed
print
report
int sumfactcif(int n)
{
if(n == 0)
return 1;
int s = 0;
while(n)
{
int a = n % 10, p = 1;
for(int i = 1 ; i <= a ; i++)
p *= i;
s += p;
n /= 10;
}
return s;
}
Advertisement
Add Comment
Please,
Sign In
to add comment
Public Pastes
Untitled
13 hours ago | 0.16 KB
settings
13 hours ago | 0.10 KB
IT & AI
22 hours ago | 1.62 KB
Stationeers - Sign Tags from Power Distributi...
HTML | 1 day ago | 2.00 KB
PM: Shopify Client Edits
1 day ago | 0.19 KB
PM: Shopify Assigning Design Task 2
1 day ago | 0.14 KB
PM: Shopify Assigning Design Task 1
1 day ago | 0.32 KB
Commodore Callback 8020
1 day ago | 0.18 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!