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
maximum_template
Taco practice
WAP in C to print the reverse of a string
tst1.c
FILE_operations
problemapi2
Stub Program for Problem 3 HW 2
Ptr_to_fct__v2
No Pyramid toggle
A_141124Burbuja