Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Bucles: Ver si un número es primo
//Ver si N es primo //clang 3.6.0 #include <stdio.h> int main(void) { int num, i, es_primo=1; printf("Ver si N es primo\n"); printf("Teclea N: "); scanf(" %d", &num); for (i=2; i<num; ++i) if (num%i==0) es_primo=0; if (es_primo==1) printf("El número %d es primo", i); else printf("El número %d no es primo", i); return 0; }
run
|
edit
|
history
|
help
0
Herout (67) - 13
random()%N stddev
CV09-2
C
Vectores: Vector inicializado manualmente
Does fgets() read past a leading newline?
Herout (67) - 12
Find the length of largest subarray with equal number of 0's and 1's using recursion
Hello World C
c_tests