Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Perfect number
#include<stdio.h> int main(){ int num,j,s=0; printf("Enter a number:"); scanf("%d",&num); for(j=1;j<num;++j){ if(num%j==0){ s=s+j; } } if(s==num){ printf("Perfect Number"); } else{ printf("Not perfect number"); } return 0; }
run
|
edit
|
history
|
help
0
A_141205_ContadorPalabras
Project 3 Part 1 v1.0
150116_FactorialPrimo
menu1.c
Finding the second largets value v0.6
WAP in C to print the reverse of a string
pattern
strcpy template
arrows
Dangling