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
exercises
strend
Maximum
etapa final de pregunta 2
Atleti
B_14118_RestasSucesivas
h
Lab 5 HW Spring 2017 v1
Multiples of 10 sum
hwkpractice