Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
B_141209_EsPrimo
//Title of this code #include <stdio.h> #include <math.h> short esPrimo(short p); int main(void) { short N; for(N = 1 ; N <= 100 ; N++) { if(esPrimo(N)) { printf("%4hd", N); } } return 0; } short esPrimo(short p) { if(p == 1 || p == 2) return 1; short d; for(d = 2 ; d <= sqrt(p) && p % d ; d++); return p % d; }
run
|
edit
|
history
|
help
0
20171117_PITAGORAS
first C code
joseph a triangle
ele888 lab1 run - graphs
C_141113_Primo01
Michael Bean's Spring 2017 Lab 3 v1
Jai
20171103_factorial
X=1
B_141121_fibonacci