Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
A_141110_Perfecto
//Title of this code #include <stdio.h> int main(void) { short N; short d; short suma; printf("Valor de N ... "); scanf(" %hd", &N); for(d = 1 , suma = 0 ; d <= N / 2 ; d++) { if(N % d == 0) { suma += d; } } // d = 1; // suma = 0; // while(d <= N / 2) // { // if(N % d == 0) { suma += d; } // d++; // } printf("\n\nLa suma es: %hd\n\n", suma); if(suma == N) { printf("SI PERFECTO!!\n\n"); } else { printf("NO PERFECTO!!\n\n"); } return 0; }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
DDD
implicit parameter type
14th Feb Programming Project v.01
bitwise operations
tickeParsing.c
Lab 9 v0.5
TopLeftTriangle.c
Lab 8 part 2 v.05
My first reevers C 2darryp
poinres1
Please log in to post a comment.