Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
150114_ArrayOrdenado
//Title of this code //gcc 4.8.2 #include <stdio.h> short esArrayOrdenado(long d, long a[d]); int main(void) { long v[10] = {5, 4, 5, 2, 1}; if(esArrayOrdenado(10, v)) { printf("SÍ ORDENADO\n\n"); } else { printf("NO ORDENADO\n\n"); } return 0; } short esArrayOrdenado(long d, long a[d]) { long i; for(i = 0 ; i < d - 1 && a[i] <= a[i + 1] ; i++); if(i == d - 1) return 1; for(i = 0 ; i < d - 1 && a[i] >= a[i + 1] ; i++); if(i == d - 1) return 1; return 0; }
run
|
edit
|
history
|
help
0
struct
Length width.c
BSEARCH() WITH STRUCT
experimento con quicksort
MATRIZ DE CADENAS
Atoi without minus
WAP in C to convert decimal to binary
IndiSelSort
C_141127_Matriz01
base