Merge pull request #99 from viditkulshreshtha/master

Thanks for contribute
This commit is contained in:
Christian Bender 2017-12-23 14:09:00 +01:00 committed by GitHub
commit 086fdac6f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -1,7 +1,7 @@
#include <stdio.h>
int fat(int number){
if (number == 1)
if (number == 1 || number == 0)
return 1;
else
return number*fat(number-1);
@ -17,4 +17,4 @@ int main(){
printf("%d\n", fat(number));
return 0;
}
}

View File

@ -14,11 +14,11 @@ int main()
}
if (sum==num)
{
printf("%d is an armstrong number!", num);
printf("%d is an armstrong number!\n", num);
}
else
{
printf("%d is not an armstrong number!", num);
printf("%d is not an armstrong number!\n", num);
}
return 0;
}
}