Skip to content

Commit

Permalink
Merge pull request harshitbansal373#9 from vskc23/patch-1
Browse files Browse the repository at this point in the history
Create FirstCommit
  • Loading branch information
harshitbansal373 authored Oct 13, 2019
2 parents c8e91c7 + b019490 commit b9b5b00
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions FirstCommit.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//FirstCommit
#include <stdio.h>
int main()
{
int n,n1,sum=0,fact=1,rem;
scanf("%d",&n);
n1 = n;
while(n1>0)
{
rem = n1%10;
for(int i=1;i<=rem;i++)
{
fact = fact * i;
}
sum = sum + fact;
n1 = n1/10;
fact = 1;
}
if (sum == n)
printf("Yes");
else
printf("No");



return 0;
}

0 comments on commit b9b5b00

Please sign in to comment.