Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- #include <ctype.h>
- #include <math.h>
- int funkcija(int *niza, int n) {
- int ok = 1;
- for(int i = 0; i < n - 1; i++) {
- if(niza[i] >= niza[i + 1]) {
- ok = 0;
- }
- }
- return ok;
- }
- int main(int argc, char * argv[]) {
- int n;
- scanf("%d", &n);
- int niza[n];
- for(int i = 0; i < n; i++) {
- scanf("%d", &niza[i]);
- }
- int rezult = funkcija(niza, n);
- printf("%d\n", rezult);
- }
- /*
- 5
- 1 -2 3 -4 5
- **/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement